From: Arne Fitzenreiter <arne_f@ipfire.org>
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 [thread overview]
Message-ID: <20200301184116.15686-2-arne_f@ipfire.org> (raw)
In-Reply-To: <20200301184116.15686-1-arne_f@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
---
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
next prev parent reply other threads:[~2020-03-01 18:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-01 18:41 [PATCH 1/4] unbound: update savesearch after reload configfiles Arne Fitzenreiter
2020-03-01 18:41 ` Arne Fitzenreiter [this message]
2020-03-01 18:41 ` [PATCH 3/4] unbound: fix typo at safesearch for googe Arne Fitzenreiter
2020-03-01 18:41 ` [PATCH 4/4] core142: ship unbound initskript Arne Fitzenreiter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200301184116.15686-2-arne_f@ipfire.org \
--to=arne_f@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox