70-dhcpdd.exe: don't run red.down scripts at "PREINIT"

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2019-12-01 14:03:46 +01:00
parent 86409ab100
commit 455291f90e
2 changed files with 5 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ var/ipfire/langs
etc/httpd/conf/vhosts.d/ipfire-interface.conf
etc/httpd/conf/vhosts.d/ipfire-interface-ssl.conf
etc/rc.d/init.d/functions
etc/rc.d/init.d/networking/dhcpcd.exe
etc/rc.d/init.d/networking/red
etc/rc.d/init.d/networking/functions.network
etc/rc.d/init.d/networking/red.up/23-suricata

View File

@@ -78,9 +78,11 @@ 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/
if [ ! $reason == "PREINIT" ]; then
logger -p local0.info -t dhcpcd.exe[$$] "${interface} has been brought down"
run_subdir ${rc_base}/init.d/networking/red.down/
fi
fi
}