components/ntp/patches/10-etcfix.patch
author Brian Utterback <brian.utterback@oracle.com>
Mon, 27 Mar 2017 14:27:31 -0700
changeset 7804 d4f2d5f40cf9
parent 3839 dece34b8bbeb
permissions -rw-r--r--
25753005 Upgrade NTP to version 4.2.8p10 25742867 problem in SERVICE/NTP
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1467
f14b6c5766ca 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     1
This patch does the customization for the Solaris way
f14b6c5766ca 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     2
of installing things. There is a method for doing this
f14b6c5766ca 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     3
with the configure scripts, but these last few file
f14b6c5766ca 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     4
paths have not been converted. When they are, this patch
f14b6c5766ca 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     5
can go away.
f14b6c5766ca 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
     6
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     7
--- include/ntp_config.h.orig	Thu May 14 06:34:41 2009
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     8
+++ include/ntp_config.h	Thu May 14 06:15:12 2009
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     9
@@ -10,7 +10,7 @@
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    10
  */
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    11
 #ifndef CONFIG_FILE
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    12
 # ifndef SYS_WINNT
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    13
-#  define	CONFIG_FILE "/etc/ntp.conf"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    14
+#  define	CONFIG_FILE "/etc/inet/ntp.conf"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    15
 # else /* SYS_WINNT */
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    16
 #  define	CONFIG_FILE	"%windir%\\system32\\drivers\\etc\\ntp.conf"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    17
 #  define	ALT_CONFIG_FILE "%windir%\\ntp.conf"
7804
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    18
*** libntp/audio.c
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    19
--- libntp/audio.c
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    20
*************** typedef int ioctl_arg_T;
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    21
*** 66,72 ****
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    22
  static struct audio_device device; /* audio device ident */
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    23
  #endif /* HAVE_SYS_AUDIOIO_H */
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    24
  #ifdef PCM_STYLE_SOUND
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    25
! # define INIT_FILE "/etc/ntp.audio"
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    26
  
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    27
  static ioctl_arg_T agc		= SOUND_MIXER_WRITE_RECLEV; /* or IGAIN or LINE */
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    28
  static ioctl_arg_T audiomonitor	= SOUND_MIXER_WRITE_VOLUME; /* or OGAIN */
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    29
--- 66,72 ----
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    30
  static struct audio_device device; /* audio device ident */
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    31
  #endif /* HAVE_SYS_AUDIOIO_H */
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    32
  #ifdef PCM_STYLE_SOUND
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    33
! # define INIT_FILE "/etc/inet/ntp.audio"
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    34
  
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    35
  static ioctl_arg_T agc		= SOUND_MIXER_WRITE_RECLEV; /* or IGAIN or LINE */
d4f2d5f40cf9 25753005 Upgrade NTP to version 4.2.8p10
Brian Utterback <brian.utterback@oracle.com>
parents: 3839
diff changeset
    36
  static ioctl_arg_T audiomonitor	= SOUND_MIXER_WRITE_VOLUME; /* or OGAIN */
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    37
--- ntpdate/ntpdate.c.orig	Thu May 14 06:34:41 2009
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    38
+++ ntpdate/ntpdate.c	Thu May 14 06:15:12 2009
1467
f14b6c5766ca 15705382 SUNBT7031289 Update ntp to 4.2.7
Brian Utterback <brian.utterback@oracle.com>
parents: 172
diff changeset
    39
@@ -179,7 +179,7 @@
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    40
 
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    41
 #ifndef KEYFILE
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    42
 # ifndef SYS_WINNT
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    43
-#define KEYFILE 	"/etc/ntp.keys"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    44
+#define KEYFILE 	"/etc/inet/ntp.keys"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    45
 # else
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    46
 #define KEYFILE 	"%windir%\\ntp.keys"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    47
 # endif /* SYS_WINNT */
3839
dece34b8bbeb 20472041 problem in SERVICE/NTP
Brian Utterback <brian.utterback@oracle.com>
parents: 1467
diff changeset
    48
--- ntpd/refclock_oncore.c
dece34b8bbeb 20472041 problem in SERVICE/NTP
Brian Utterback <brian.utterback@oracle.com>
parents: 1467
diff changeset
    49
+++ ntpd/refclock_oncore.c
dece34b8bbeb 20472041 problem in SERVICE/NTP
Brian Utterback <brian.utterback@oracle.com>
parents: 1467
diff changeset
    50
@@ -1211,7 +1211,7 @@ oncore_read_config(
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    51
 
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    52
 	FILE	*fd;
3839
dece34b8bbeb 20472041 problem in SERVICE/NTP
Brian Utterback <brian.utterback@oracle.com>
parents: 1467
diff changeset
    53
 	char	*cc, *ca, line[100], units[2], device[64];
dece34b8bbeb 20472041 problem in SERVICE/NTP
Brian Utterback <brian.utterback@oracle.com>
parents: 1467
diff changeset
    54
-	const char	*dirs[] = { "/etc/ntp", "/etc", 0 };
dece34b8bbeb 20472041 problem in SERVICE/NTP
Brian Utterback <brian.utterback@oracle.com>
parents: 1467
diff changeset
    55
+	const char	*dirs[] = { "/etc/inet/ntp", "/etc/inet", 0 };
dece34b8bbeb 20472041 problem in SERVICE/NTP
Brian Utterback <brian.utterback@oracle.com>
parents: 1467
diff changeset
    56
 	const char *cp, **cpp;
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    57
 	int	i, sign, lat_flg, long_flg, ht_flg, mode, mask;
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    58
 	double	f1, f2, f3;