unbound/ntp: move not working DNS fallback from ntp to unbound initskript

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>
This commit is contained in:
Arne Fitzenreiter
2017-08-15 20:20:16 +02:00
parent 874eabd6f5
commit 05478072cd
3 changed files with 12 additions and 8 deletions

View 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

View 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!"

View 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)