]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't restart ntpd if it's not already running.
authorRoy Marples <roy@marples.name>
Tue, 11 Nov 2008 09:29:54 +0000 (09:29 +0000)
committerRoy Marples <roy@marples.name>
Tue, 11 Nov 2008 09:29:54 +0000 (09:29 +0000)
dhcpcd-hooks/50-ntp.conf

index d4062589d161985ae326875ea27bd6beb624f3d7..3e02bc5364a1f2cd41af15039987ee12ae9aefd4 100644 (file)
@@ -13,9 +13,9 @@
 if type rc-service >/dev/null 2>&1 && rc-service --exists ntpd; then
        ntpd_restart_cmd="rc-service ntpd -- --ifstarted --quiet restart"
 elif [ -x /etc/rc.d/ntpd ]; then
-       ntpd_restart_cmd="/etc/rc.d/ntpd restart"
+       ntpd_restart_cmd="/etc/rc.d/ntpd status && /etc/rc.d/ntpd restart"
 elif [ -x /usr/local/etc/rc.d/ntpd ]; then
-       ntpd_restart_cmd="/usr/local/etc/rc.d/ntpd restart"
+       ntpd_restart_cmd="/usr/local/etc/rc.d/ntpd status && /usr/local/etc/rc.d/ntpd restart"
 fi
 
 ntp_conf_dir="${state_dir}/ntp.conf"