dhcpcd.exe: Allow using the DHCP setup scripts when RED is not configured as DHCP

This is useful for dial-up methods that use DHCP, but when RED_TYPE is
configured as PPP.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2022-12-01 17:22:53 +00:00
committed by Peter Müller
parent 177ec16705
commit 33d2aa6d02

View File

@@ -34,7 +34,6 @@ dhcpcd_up()
fi
# Only if RED_TYPE=DHCP update /var/ipfire/red
if [ "$RED_TYPE" == "DHCP" ]; then
# Check if we have to restart the services at update
[ ! -e "/var/ipfire/red/active" ] && update=1;
if [ "$old_domain_name_service" != "$new_domain_name_service" ]; then
@@ -59,7 +58,6 @@ dhcpcd_up()
echo "$new_routers gateway" >> /tmp/hosts
mv /tmp/hosts /etc/hosts
fi
if [ $update ]; then
[ -e "/var/ipfire/red/active" ] || touch /var/ipfire/red/active
echo -n "$new_routers" > /var/ipfire/red/remote-ipaddress