]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
unbound/ntp: move not working DNS fallback from ntp to unbound initskript
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 15 Aug 2017 18:20:16 +0000 (20:20 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 15 Aug 2017 18:20:16 +0000 (20:20 +0200)
the ntp initskript will only run at first connection try. If this fails
and the connection can established later DNS will not work if the clock
is too far away.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/113/filelists/files
src/initscripts/system/ntp
src/initscripts/system/unbound

index 168c7d188b168dbae0b0001b8a01b6abe242c563..ceed6de2dbafae9557e0a0c4ed16a0c767adead4 100644 (file)
@@ -1,3 +1,5 @@
 etc/system-release
 etc/issue
+etc/rc.d/init.d/ntp
+etc/rc.d/init.d/unbound
 var/ipfire/langs
index 0793927908f762bac2ace9a652793d7831b86c7e..d411ba18d6f66108df695e1a0c2f192db7255c09 100644 (file)
@@ -27,14 +27,6 @@ case "$1" in
                        fi
                        if [ -e /var/ipfire/red/active ]; then
                                boot_mesg ""
-
-                               host ping.ipfire.org > /dev/null 2>&1
-                               if [ "${?}" != "0" ]; then
-                                       boot_mesg "DNS not work ... init with ntp.ipfire.org at 81.3.27.46 ..."
-                                       loadproc /usr/local/bin/settime 81.3.27.46
-                                       boot_mesg "Setting time on boot..."
-                               fi
-
                                loadproc /usr/local/bin/settime $(cat /var/ipfire/time/settime.conf)
                        else
                                boot_mesg " ERROR! Not online!"
index 7437d93b835c6e4c9f76835b95ea7f6cdeecc3ea..3002f480050cd4f7c63c228843caf15cc5950978 100644 (file)
@@ -484,6 +484,16 @@ case "$1" in
 
                # Update hosts
                update_hosts
+
+               # If DNS still not work try to init ntp with
+               # hardcoded ntp.ipfire.org (81.3.27.46)
+               if [ -e /var/ipfire/red/active ]; then
+                       host 0.ipfire.pool.ntp.org > /dev/null 2>&1
+                       if [ "${?}" != "0" ]; then
+                               boot_mesg "DNS still not work ... init time with ntp.ipfire.org at 81.3.27.46 ..."
+                               loadproc /usr/local/bin/settime 81.3.27.46
+                       fi
+               fi
                ;;
 
        stop)