From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH 2/4] unbound: run "time-fix" before savesearch resolves Date: Sun, 01 Mar 2020 19:41:14 +0100 Message-ID: <20200301184116.15686-2-arne_f@ipfire.org> In-Reply-To: <20200301184116.15686-1-arne_f@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2845616386024368223==" List-Id: --===============2845616386024368223== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Signed-off-by: Arne Fitzenreiter --- src/initscripts/system/unbound | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 507f589ca..7bf2ffc2c 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 ;; -- 2.17.1 --===============2845616386024368223==--