From: Roy Marples Date: Thu, 31 Jul 2008 12:20:26 +0000 (+0000) Subject: Always restart ntp even config hasn't changed as it could have been configured correc... X-Git-Tag: v4.0.2~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af8c4c92e971b8745d6d3589c5ddee0f98153fae;p=thirdparty%2Fdhcpcd.git Always restart ntp even config hasn't changed as it could have been configured correctly and started before dhcpcd, which means it won't actually be talking to the ntp server we want. --- diff --git a/dhcpcd-hooks/50-ntp.conf b/dhcpcd-hooks/50-ntp.conf index 37722157..81faf22e 100644 --- a/dhcpcd-hooks/50-ntp.conf +++ b/dhcpcd-hooks/50-ntp.conf @@ -21,22 +21,9 @@ make_ntp_conf() echo "restrict ${x} nomodify notrap noquery" >> "${cf}" echo "server ${x}" >> "${cf}" done - if [ ! -e /etc/ntp.conf ]; then - false - elif type cmp >/dev/null 2>&1; then - cmp -s /etc/ntp.conf "${cf}" - elif type diff >/dev/null 2>&1; then - diff -q /etc/ntp.conf "${cf}" >/dev/null - else - false - fi - if [ $? = 0 ]; then - rm -f "${cf}" - else - save_conf /etc/ntp.conf - mv -f "${cf}" /etc/ntp.conf - [ -n "${ntpd_restart_cmd}" ] && ${ntpd_restart_cmd} - fi + save_conf /etc/ntp.conf + mv -f "${cf}" /etc/ntp.conf + [ -n "${ntpd_restart_cmd}" ] && ${ntpd_restart_cmd} } restore_ntp_conf()