From: Arne Fitzenreiter Date: Sun, 1 Mar 2020 18:41:14 +0000 (+0100) Subject: unbound: run "time-fix" before savesearch resolves X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=d98bbcc8494d4037df2572098fa9ea77f932ce1a unbound: run "time-fix" before savesearch resolves Signed-off-by: Arne Fitzenreiter --- diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 507f589cad..7bf2ffc2cf 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -587,7 +587,7 @@ case "$1" in sleep 1 $0 start ;; - reload|remove-forwarders) + reload|remove-forwarders|update-forwarders) # Update configuration files write_forward_conf write_hosts_conf @@ -595,6 +595,14 @@ case "$1" in # Call unbound-control and perform the reload /usr/sbin/unbound-control -q reload + # Dummy Resolve to wait for unbound + resolve "ping.ipfire.org" &>/dev/null + + if [ "$1" = "update-forwarders" ]; then + # Make sure DNS works at this point + fix_time_if_dns_fails + fi + # Update Safe Search rules if the system is online. if [ -e "/var/ipfire/red/active" ]; then update_safe_search @@ -605,9 +613,6 @@ case "$1" in statusproc /usr/sbin/unbound ;; - update-forwarders) - $0 reload - # Make sure DNS works at this point fix_time_if_dns_fails ;;