From ebf64a93ee01f18226a8ed465a188f976097ee34 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 27 May 2017 11:23:58 +0100 Subject: [PATCH] Fix shutting down unbound when red is STATIC 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 --- config/rootfiles/core/111/filelists/files | 2 ++ src/initscripts/networking/dhcpcd.exe | 1 - src/initscripts/networking/red | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/rootfiles/core/111/filelists/files b/config/rootfiles/core/111/filelists/files index dbe65e2f0d..f1e9746add 100644 --- a/config/rootfiles/core/111/filelists/files +++ b/config/rootfiles/core/111/filelists/files @@ -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 diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networking/dhcpcd.exe index a2cdc66d25..6c1391d71f 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -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 } diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index 00e739cab1..20567ce512 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -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 -- 2.39.5