diff options
Diffstat (limited to 'source/n/dhcpcd/50-ntp.conf.diff')
-rw-r--r-- | source/n/dhcpcd/50-ntp.conf.diff | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/source/n/dhcpcd/50-ntp.conf.diff b/source/n/dhcpcd/50-ntp.conf.diff index d86c299e2..63fd914b4 100644 --- a/source/n/dhcpcd/50-ntp.conf.diff +++ b/source/n/dhcpcd/50-ntp.conf.diff @@ -1,19 +1,29 @@ -diff -Nur dhcpcd-5.1.0.orig/dhcpcd-hooks/50-ntp.conf dhcpcd-5.1.0/dhcpcd-hooks/50-ntp.conf ---- dhcpcd-5.1.0.orig/dhcpcd-hooks/50-ntp.conf 2009-09-02 15:21:11.000000000 -0500 -+++ dhcpcd-5.1.0/dhcpcd-hooks/50-ntp.conf 2009-09-12 00:36:04.447859980 -0500 -@@ -8,14 +8,8 @@ +--- ./dhcpcd-hooks/50-ntp.conf.orig 2010-11-19 04:17:14.000000000 -0600 ++++ ./dhcpcd-hooks/50-ntp.conf 2010-12-29 16:07:48.000000000 -0600 +@@ -8,6 +8,26 @@ # NTP_CONF=/usr/pkg/etc/ntpd.conf # to use openntpd from pkgsrc instead of the system provided ntp. --# Detect OpenRC or BSD rc --# Distributions may want to just have their command here instead of this --if type rc-service >/dev/null 2>&1 && rc-service --exists ntpd; then -- ntpd_restart_cmd="rc-service ntpd -- -Ds restart" --elif [ -x /etc/rc.d/ntpd ]; then -+if [ -x /etc/rc.d/ntpd ]; then - ntpd_restart_cmd="/etc/rc.d/ntpd status >/dev/null 2>&1 && /etc/rc.d/ntpd restart" --elif [ -x /usr/local/etc/rc.d/ntpd ]; then -- ntpd_restart_cmd="/usr/local/etc/rc.d/ntpd status >/dev/null 2>&1 && /usr/local/etc/rc.d/ntpd restart" - fi - - ntp_conf_dir="$state_dir/ntp.conf" ++# Detect OpenRC, Debian or BSD rc ++# Distributions may want to just have their command here instead of this ++if type rc-service >/dev/null 2>&1 && rc-service --exists ntpd; then ++ ntpd_restart_cmd="rc-service ntpd -- -Ds restart" ++elif type invoke-rc.d >/dev/null 2>&1; then ++ if [ -x /etc/init.d/ntp ]; then ++ ntpd_restart_cmd="invoke-rc.d ntp try-restart" ++ fi ++ # Debian as a seperate file for DHCP config to avoid stamping on ++ # the master. ++ [ -e /var/lib/ntp ] || mkdir /var/lib/ntp ++ : ${NTP_DHCP_CONF:=/var/lib/ntp/ntp.conf.dhcp} ++elif [ -x /etc/rc.d/ntpd ]; then ++ ntpd_restart_cmd="/etc/rc.d/ntpd status >/dev/null 2>&1 && /etc/rc.d/ntpd restart" ++elif [ -x /usr/local/etc/rc.d/ntpd ]; then ++ ntpd_restart_cmd="/usr/local/etc/rc.d/ntpd status >/dev/null 2>&1 && /usr/local/etc/rc.d/ntpd restart" ++elif [ -x /etc/rc.d/rc.ntpd ]; then ++ ntpd_restart_cmd="/etc/rc.d/rc.ntpd status >/dev/null 2>&1 && /etc/rc.d/rc.ntpd restart" ++fi ++ + : ${ntpd_restart_cmd:=service_condcommand ntpd restart} + if type invoke-rc.d >/dev/null 2>&1; then + # Debian has a seperate file for DHCP config to avoid stamping on |