1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

sbin: start-networking: remove dhclient lease files on shutdown

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
This commit is contained in:
Julien Fortin
2022-05-26 12:35:18 +02:00
parent 6bd1ac25a8
commit 89df6ae095

View File

@ -136,7 +136,9 @@ stop)
systemctl list-jobs | egrep -q '(shutdown|reboot|halt|poweroff)\.target'
[ $? -eq 0 ] && SYSRESET=1
if [ $SYSRESET -eq 1 ]; then
echo ${NAME}':' "Skipping deconfiguring network interfaces"
echo ${NAME}':' "Removing dhclient service files (if any)"
find /var/lib/dhcp/ -name "dhclient*leases" -delete
echo ${NAME}':' "Skipping deconfiguring the rest of the network interfaces"
exit 0
fi
fi