]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Always restart ntp even config hasn't changed as it could have been configured correc...
authorRoy Marples <roy@marples.name>
Thu, 31 Jul 2008 12:20:26 +0000 (12:20 +0000)
committerRoy Marples <roy@marples.name>
Thu, 31 Jul 2008 12:20:26 +0000 (12:20 +0000)
dhcpcd-hooks/50-ntp.conf

index 37722157f5a6b91f26f138720de75f2c716f8c70..81faf22e70da33d9a90de71bdc30e74acc459ed5 100644 (file)
@@ -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()