From: Michael Tremer Date: Thu, 8 Sep 2022 10:21:31 +0000 (+0200) Subject: dhcpcd.exe: Flush any configured IP addresses on shutdown X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df6f39c0df57020982b39b6743c6f8551d66cbb2;p=people%2Fms%2Fipfire-2.x.git dhcpcd.exe: Flush any configured IP addresses on shutdown This allows us to start with a fresh interface every time dhcpcd is being restarted. Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networking/dhcpcd.exe index be6d637088..f79d5d16dd 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -84,6 +84,11 @@ dhcpcd_down() run_subdir ${rc_base}/init.d/networking/red.down/ fi fi + + # Remove any configured IP address from the device + ip addr flush dev "${interface}" &>/dev/null + + return 0 } # Called when dhcpcd relies on a third party to configure an IP address