]> git.ipfire.org Git - people/mlorenz/ipfire-2.x.git/commitdiff
Fix shutting down unbound when red is STATIC
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 May 2017 10:23:58 +0000 (11:23 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 27 May 2017 10:23:58 +0000 (11:23 +0100)
Unbound was trying to check availability of the upstream name servers
when /var/ipfire/red/active is present. This patch removes it first
and then brings down the red device.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/111/filelists/files
src/initscripts/networking/dhcpcd.exe
src/initscripts/networking/red

index dbe65e2f0d1036aa29b4bad3a975aaca0c759e4a..f1e9746add694956187059069988b990d98a495c 100644 (file)
@@ -1,5 +1,7 @@
 etc/system-release
 etc/issue
+etc/rc.d/init.d/networking/dhcpcd.exe
+etc/rc.d/init.d/networking/red
 etc/rc.d/init.d/wlanclient
 srv/web/ipfire/cgi-bin/index.cgi
 srv/web/ipfire/cgi-bin/ipinfo.cgi
index a2cdc66d257404c57cdad5013cda247bbfcbe751..6c1391d71f2d6c6f3a73136684ac5a2160a200c7 100644 (file)
@@ -79,7 +79,6 @@ dhcpcd_down()
        # Only if RED_TYPE=DHCP update /var/ipfire/red
        if [ "$RED_TYPE" == "DHCP" ]; then
                logger -p local0.info -t dhcpcd.exe[$$] "${interface} has been brought down"
-               rm -f /var/ipfire/red/active
                run_subdir ${rc_base}/init.d/networking/red.down/
        fi
 }
index 00e739cab14aedff772b88fc6fe9bc003897e29a..20567ce512d7a40ec0c27f3f8f9e05ff26faf481 100644 (file)
@@ -457,6 +457,8 @@ case "${1}" in
                ;;
 
        stop)
+               rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
+
                if [ "$TYPE" == "STATIC" ]; then
                        boot_mesg "Stopping default gateway ${GATEWAY}..."
                        ip route del default via ${GATEWAY} >/dev/null 2>&1
@@ -521,7 +523,6 @@ case "${1}" in
                ## Disable vnstat collection
                /usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1
 
-               rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
                exit 0;
                ;;
 esac