]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't compare if file does not exist.
authorRoy Marples <roy@marples.name>
Mon, 14 Apr 2008 19:28:28 +0000 (19:28 +0000)
committerRoy Marples <roy@marples.name>
Mon, 14 Apr 2008 19:28:28 +0000 (19:28 +0000)
dhcpcd.sh

index b702daf5ed1e2f5abd4c5fc2788480bb4d0292a5..2828a16b568fcd88623eecd3a0261add843ae474 100755 (executable)
--- a/dhcpcd.sh
+++ b/dhcpcd.sh
@@ -167,7 +167,9 @@ make_ntp_conf()
                echo "restrict ${x} nomodify notrap noquery" >> "${cf}"
                echo "server ${x}" >> "${cf}"
        done
-       if type cmp >/dev/null 2>&1; then
+       if [ ! -e /etc/ntp.conf ]; then
+               true
+       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