mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
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:
@@ -1,3 +1,5 @@
|
||||
etc/system-release
|
||||
etc/issue
|
||||
etc/rc.d/init.d/ntp
|
||||
etc/rc.d/init.d/unbound
|
||||
var/ipfire/langs
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user