]> git.ipfire.org Git - people/jschlag/ipfire-2.x.git/commitdiff
network startup: Always cleanup before red gets started improve_network_startup_prep_1
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 31 Dec 2021 09:41:21 +0000 (10:41 +0100)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Sun, 27 Aug 2023 18:41:21 +0000 (20:41 +0200)
There is no sense in doing this only in /etc/init.d/network
and not in /etc/init.d/networking/red

This files should be always deleted before a startup

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
src/initscripts/networking/red
src/initscripts/system/network

index 9da3ea406d71423df4df289497051717f9790e49..beb665e5f45f653cbd079d07d64e4a006109aaeb 100644 (file)
@@ -80,6 +80,9 @@ fi
 
 case "${1}" in
        start)
+               # Remove possible leftover files
+               rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
+
                if [ "${DEVICE}" != "${GREEN_DEV}" ] && [ "${DEVICE}" != "" ]; then
                        boot_mesg "Bringing up the ${DEVICE} interface..."
                        boot_mesg_flush
index b38c3836cb5af4dd65ec17b218a3763b7be5bff9..0dcce060fb10800712e96fa53fca629311238415 100644 (file)
@@ -62,11 +62,7 @@ case "${DO}" in
                        /etc/rc.d/init.d/networking/orange start
 
                # RED
-               if [ "$red" == "1" ]; then
-                       # Remove possible leftover files
-                       rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
-                       /etc/rc.d/init.d/networking/red start
-               fi
+               [ "$red" == "1" ] && /etc/rc.d/init.d/networking/red start
 
                # Create IPsec interfaces
                /usr/local/bin/ipsec-interfaces