diff options
Diffstat (limited to 'patches/source/dhcpcd/50-ntp.conf.diff')
-rw-r--r-- | patches/source/dhcpcd/50-ntp.conf.diff | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/source/dhcpcd/50-ntp.conf.diff b/patches/source/dhcpcd/50-ntp.conf.diff new file mode 100644 index 00000000..63fd914b --- /dev/null +++ b/patches/source/dhcpcd/50-ntp.conf.diff @@ -0,0 +1,29 @@ +--- ./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, 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 |