From: Michael Tremer Date: Sat, 1 Oct 2016 17:52:07 +0000 (+0100) Subject: unbound: Start unbound when invoked by DHCP scripts X-Git-Tag: v2.19-core106~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46d8d50f459be1cc2220b8b0a0de9c6943e9ab1f;p=ipfire-2.x.git unbound: Start unbound when invoked by DHCP scripts Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/init.d/networking/red.up/05-update-dns-forwarders b/src/initscripts/init.d/networking/red.up/05-update-dns-forwarders index 7f35696f58..be8879ca9e 100644 --- a/src/initscripts/init.d/networking/red.up/05-update-dns-forwarders +++ b/src/initscripts/init.d/networking/red.up/05-update-dns-forwarders @@ -1,4 +1,12 @@ #!/bin/bash -# Update DNS forwarders for unbound -exec /etc/init.d/unbound update-forwarders +# If network has not fully been brought up here, we start unbound +# so that all following scripts can rely on DNS resolution + +# Update DNS forwarders if unbound is running +if pgrep -q unbound; then + exec /etc/init.d/unbound update-forwarders +fi + +# Start unbound if it is not running, yet +exec /etc/init.d/unbound start