diff options
-rw-r--r-- | debian/vyatta-cfg-system.postinst.in | 11 | ||||
-rwxr-xr-x | scripts/rl-system.init | 10 | ||||
-rwxr-xr-x | scripts/system/vyatta_update_resolv.pl | 2 | ||||
-rw-r--r-- | sysconf/ntp.conf | 14 |
4 files changed, 27 insertions, 10 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index ec159432..38757106 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -83,7 +83,8 @@ Cmnd_Alias DISK = /usr/bin/lsof, /sbin/fdisk -l *, /sbin/sfdisk -d * Cmnd_Alias DATE = /bin/date, /usr/sbin/ntpdate Cmnd_Alias PPPOE_CMDS = /sbin/pppd, /sbin/poff, /usr/sbin/pppstats Cmnd_Alias PCAPTURE = /usr/bin/tshark, /usr/bin/tcpdump -%operator ALL=NOPASSWD: DATE, IPTABLES, ETHTOOL, IPFLUSH, \ +Cmnd_Alias HWINFO = /usr/bin/lspci +%operator ALL=NOPASSWD: DATE, IPTABLES, ETHTOOL, IPFLUSH, HWINFO, \ PPPOE_CMDS, PCAPTURE, /usr/sbin/wanpipemon, \ DISK, CONNTRACK, IP6TABLES EOF @@ -106,12 +107,8 @@ EOF fi done - # replace debian /etc/ntp.conf with Vyatta version - cp $sysconfdir/ntp.conf /etc/ntp.conf - - # remove debian rules that use /etc/network/interfaces - # to avoid warning about missing ifup (bug 3885) - sed -i -e '/net.agent/s/^SUBSYSTEM/#&/' /etc/udev/rules.d/80-drivers.rules + # purge off ancient devfs stuff from /etc/securetty + cp $sysconfdir/securetty /etc/securetty fi # update crontab for logrotate diff --git a/scripts/rl-system.init b/scripts/rl-system.init index 4c8c937f..e05e0564 100755 --- a/scripts/rl-system.init +++ b/scripts/rl-system.init @@ -154,12 +154,22 @@ set_ipv6_params () done } +setup_ntp_config_file () { + template_ntp_conf=/opt/vyatta/etc/ntp.conf + if [ -e $template_ntp_conf ]; then + cp -f $template_ntp_conf /etc/ntp.conf + else + log_failure_msg "NTP template config file doesn\'t exist" + fi +} + start () { udev_rescan create_ssh_host_keys || \ log_failure_msg "can't initialize ssh host keys" clear_or_override_config_files || \ log_failure_msg "can\'t reset config files" + setup_ntp_config_file add_new_serial_if || \ log_failure_msg "can\'t add serial interfaces" sysctl -q -p /opt/vyatta/etc/vyatta-sysctl.conf || diff --git a/scripts/system/vyatta_update_resolv.pl b/scripts/system/vyatta_update_resolv.pl index d8e30961..7f2b84b2 100755 --- a/scripts/system/vyatta_update_resolv.pl +++ b/scripts/system/vyatta_update_resolv.pl @@ -178,7 +178,7 @@ if ($dhclient_script == 1) { } if ($restart_ntp == 1) { # this corresponds to what is done in name-server/node.def as a fix for bug 1300 - my $cmd_ntp_restart = "if [ -f /etc/ntp.conf ] && grep -q 'server' /etc/ntp.conf; then /usr/sbin/invoke-rc.d ntp restart >&/dev/null; fi &"; + my $cmd_ntp_restart = "if [ -f /etc/ntp.conf ] && grep -q '^server' /etc/ntp.conf; then /usr/sbin/invoke-rc.d ntp restart >&/dev/null; fi &"; system($cmd_ntp_restart); } } diff --git a/sysconf/ntp.conf b/sysconf/ntp.conf index 2bd9a711..248cdc2d 100644 --- a/sysconf/ntp.conf +++ b/sysconf/ntp.conf @@ -1,5 +1,12 @@ # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help +# This configuration file is automatically generated by the Vyatta +# configuration subsystem. Please do not manually edit it. +# +# The first section of this file consists of static parameters +# that can not be changed via the Vyatta configuration subsystem. +# + driftfile /var/lib/ntp/ntp.drift # By default, exchange time with everybody, but don't allow configuration. @@ -10,5 +17,8 @@ restrict -6 default kod notrap nomodify nopeer noquery restrict 127.0.0.1 restrict ::1 -# You do need to talk to an NTP server or two (or three). -server 0.vyatta.pool.ntp.org iburst +# +# The remainder of this file is for parameters that are set up via +# the Vyatta configuration subsystem. +# + |