Skip to content

Conversation

@MBRjun
Copy link

@MBRjun MBRjun commented Apr 12, 2025

if [ $SYSRESET -eq 1 ]; then
    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

ifupdown2 currently remove all leases file when system shutdown or reboot. This will clear some information such as DUID that should not change on reboot. Remove DUID could cause system cannot obtain a reliable address via DHCPv6.

Preserving the lease file across reboots can also speed up the DHCP process if lease not expired and address still available. dhclient send Confirm message to DHCP server on start if lease file already exist.

Does this -delete behavior make any sense? ifupdown does not have this behavior. I only found that this breaks my IPv6 connection. This reverts 89df6ae.

@julienfortin
Copy link
Contributor

@MBRjun i'll have to look at the history of this change but keeping the lease file wasn't working for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants