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:
@ -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
|
||||
|
Reference in New Issue
Block a user