From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer <michael.tremer@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH 20/29] dhcpcd.exe: Run everything no matter how RED is configured Date: Thu, 01 Dec 2022 17:23:09 +0000 Message-ID: <20221201172318.3166615-20-michael.tremer@ipfire.org> In-Reply-To: <20221201172318.3166615-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5571267693094373145==" List-Id: <development.lists.ipfire.org> --===============5571267693094373145== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This could potentially create problems when we abuse these functions to launch the DHCP client on IPTV interfaces. This would have to be tested and confirmed or potentially we would need some more changes to keep supporting that use-case, too. Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org> --- src/initscripts/networking/dhcpcd.exe | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networki= ng/dhcpcd.exe index 440a76693..f6e494f96 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -34,7 +34,6 @@ dhcpcd_up() exit 0; fi =20 - # Only if RED_TYPE=3DDHCP update /var/ipfire/red # Check if we have to restart the services at update [ ! -e "/var/ipfire/red/active" ] && update=3D1; if [ "$old_domain_name_service" !=3D "$new_domain_name_service" ]; then @@ -82,13 +81,12 @@ dhcpcd_down() # Remove DNS servers rm -f /var/run/dns1 /var/run/dns2 =20 - # Only if RED_TYPE=3DDHCP update /var/ipfire/red - if [ "$RED_TYPE" =3D=3D "DHCP" ]; then - rm -f /var/ipfire/red/active - if [ ! $reason =3D=3D "PREINIT" ]; then - logger -p local0.info -t dhcpcd.exe[$$] "${interface} has been brought do= wn ($reason)" - run_subdir ${rc_base}/init.d/networking/red.down/ - fi + # Consider RED to be no longer active + rm -f /var/ipfire/red/active + + if [ ! $reason =3D=3D "PREINIT" ]; then + logger -p local0.info -t dhcpcd.exe[$$] "${interface} has been brought dow= n ($reason)" + run_subdir ${rc_base}/init.d/networking/red.down/ fi =20 # Remove any configured IP address from the device --=20 2.30.2 --===============5571267693094373145==--