From: Roy Marples Date: Tue, 11 Nov 2008 09:28:17 +0000 (+0000) Subject: Don't restart ntpd if it's not already running. X-Git-Tag: v5.0.0~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b9750ea051be312f7cb4721a34d306446934c7a;p=thirdparty%2Fdhcpcd.git Don't restart ntpd if it's not already running. --- diff --git a/dhcpcd-hooks/50-ntp.conf b/dhcpcd-hooks/50-ntp.conf index d4062589..3e02bc53 100644 --- a/dhcpcd-hooks/50-ntp.conf +++ b/dhcpcd-hooks/50-ntp.conf @@ -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"