unbound: drop remove-dns-fowarders at red.down
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 2 Mar 2020 17:54:48 +0000 (17:54 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 2 Mar 2020 17:54:48 +0000 (17:54 +0000)
this functions has only reloaded unbound config
which is useless at shutting down the red interface.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/common/aarch64/initscripts
config/rootfiles/common/armv5tel/initscripts
config/rootfiles/common/i586/initscripts
config/rootfiles/common/x86_64/initscripts
config/rootfiles/core/142/update.sh
src/initscripts/networking/red.down/05-remove-dns-forwarders [deleted file]
src/initscripts/system/unbound

index 34ea143..3c8dfc7 100644 (file)
@@ -42,7 +42,6 @@ etc/rc.d/init.d/networking/green
 etc/rc.d/init.d/networking/orange
 etc/rc.d/init.d/networking/red
 #etc/rc.d/init.d/networking/red.down
-etc/rc.d/init.d/networking/red.down/05-remove-dns-forwarders
 etc/rc.d/init.d/networking/red.down/10-ipsec
 etc/rc.d/init.d/networking/red.down/10-miniupnpd
 etc/rc.d/init.d/networking/red.down/10-ovpn
index 34ea143..3c8dfc7 100644 (file)
@@ -42,7 +42,6 @@ etc/rc.d/init.d/networking/green
 etc/rc.d/init.d/networking/orange
 etc/rc.d/init.d/networking/red
 #etc/rc.d/init.d/networking/red.down
-etc/rc.d/init.d/networking/red.down/05-remove-dns-forwarders
 etc/rc.d/init.d/networking/red.down/10-ipsec
 etc/rc.d/init.d/networking/red.down/10-miniupnpd
 etc/rc.d/init.d/networking/red.down/10-ovpn
index 9350b0e..3f56c49 100644 (file)
@@ -42,7 +42,6 @@ etc/rc.d/init.d/networking/green
 etc/rc.d/init.d/networking/orange
 etc/rc.d/init.d/networking/red
 #etc/rc.d/init.d/networking/red.down
-etc/rc.d/init.d/networking/red.down/05-remove-dns-forwarders
 etc/rc.d/init.d/networking/red.down/10-ipsec
 etc/rc.d/init.d/networking/red.down/10-miniupnpd
 etc/rc.d/init.d/networking/red.down/10-ovpn
index 9350b0e..3f56c49 100644 (file)
@@ -42,7 +42,6 @@ etc/rc.d/init.d/networking/green
 etc/rc.d/init.d/networking/orange
 etc/rc.d/init.d/networking/red
 #etc/rc.d/init.d/networking/red.down
-etc/rc.d/init.d/networking/red.down/05-remove-dns-forwarders
 etc/rc.d/init.d/networking/red.down/10-ipsec
 etc/rc.d/init.d/networking/red.down/10-miniupnpd
 etc/rc.d/init.d/networking/red.down/10-ovpn
index bf63f58..9a58291 100644 (file)
@@ -91,6 +91,9 @@ rm -rf /usr/lib/pppd/2.4.7
 /etc/init.d/squid stop
 /etc/init.d/suricata stop
 
+# drop unbound remove-forwarders
+rm -f /etc/rc.d/init.d/netowrking/red.down/05-remove-dns-forwarders
+
 # Extract files
 extract_files
 
diff --git a/src/initscripts/networking/red.down/05-remove-dns-forwarders b/src/initscripts/networking/red.down/05-remove-dns-forwarders
deleted file mode 100644 (file)
index 671cca9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-# Remove DNS forwarders for unbound
-exec /etc/init.d/unbound remove-forwarders
index 0aab6cc..c845c43 100644 (file)
@@ -274,8 +274,6 @@ get_memory_amount() {
 }
 
 fix_time_if_dns_fails() {
-       # Sometimes the first try fails so do it twice
-       resolve "ping.ipfire.org" &>/dev/null
        # If DNS is working, everything is fine
        if resolve "ping.ipfire.org" &>/dev/null; then
                return 0
@@ -587,7 +585,7 @@ case "$1" in
                sleep 1
                $0 start
                ;;
-       reload|remove-forwarders|update-forwarders)
+       reload|update-forwarders)
                # Update configuration files
                write_forward_conf
                write_hosts_conf
@@ -595,10 +593,6 @@ case "$1" in
                # Call unbound-control and perform the reload
                /usr/sbin/unbound-control -q reload
 
-               if [ "$1" = "remove-forwarders" ]; then
-                       exit 0
-               fi
-
                # Dummy Resolve to wait for unbound
                resolve "ping.ipfire.org" &>/dev/null
 
@@ -617,16 +611,12 @@ case "$1" in
                statusproc /usr/sbin/unbound
                ;;
 
-               # Make sure DNS works at this point
-               fix_time_if_dns_fails
-               ;;
-
        resolve)
                resolve "${2}" || exit $?
                ;;
 
        *)
-               echo "Usage: $0 {start|stop|restart|reload|status|resolve|update-forwarders|remove-forwarders}"
+               echo "Usage: $0 {start|stop|restart|reload|status|resolve|update-forwarders}"
                exit 1
                ;;
 esac