From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonatan Schlag To: development@lists.ipfire.org Subject: [PATCH 5/5] network startup: Always cleanup before red gets started Date: Tue, 29 Aug 2023 10:52:41 +0200 Message-ID: <20230829085241.6985-5-jonatan.schlag@ipfire.org> In-Reply-To: <20230829085241.6985-1-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0593969998572607136==" List-Id: --===============0593969998572607136== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 --- src/initscripts/networking/red | 3 +++ src/initscripts/system/network | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index 9da3ea406..beb665e5f 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -80,6 +80,9 @@ fi =20 case "${1}" in start) + # Remove possible leftover files + rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddr= ess,remote-ipaddress,resolv.conf} + if [ "${DEVICE}" !=3D "${GREEN_DEV}" ] && [ "${DEVICE}" !=3D "" ]; then boot_mesg "Bringing up the ${DEVICE} interface..." boot_mesg_flush diff --git a/src/initscripts/system/network b/src/initscripts/system/network index b38c3836c..0dcce060f 100644 --- a/src/initscripts/system/network +++ b/src/initscripts/system/network @@ -62,11 +62,7 @@ case "${DO}" in /etc/rc.d/init.d/networking/orange start =20 # RED - if [ "$red" =3D=3D "1" ]; then - # Remove possible leftover files - rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipadd= ress,remote-ipaddress,resolv.conf} - /etc/rc.d/init.d/networking/red start - fi + [ "$red" =3D=3D "1" ] && /etc/rc.d/init.d/networking/red start =20 # Create IPsec interfaces /usr/local/bin/ipsec-interfaces --=20 2.39.2 --===============0593969998572607136==--