Dhclient don't recover after network cable has been disconnected for a while In file: /lib/rcscripts/net/dhclient.sh: on line: 109 is it possible to remove the static entry of -1 when starting dhclient --pidfile "${pidfile}" -- ${opts} -q -1 -pf "${pidfile}" "${iface}" should be --pidfile "${pidfile}" -- ${opts} -q -pf "${pidfile}" "${iface}" DESC in manpage The -1 flag cause dhclient to try once to get a lease. If it fails, dhclient exits with exit code two. it should be away to disable this flag or if it could be removed compleatly Reproducible: Always Steps to Reproduce: 1. config dhclient in net modules=("dhclient") 2. start eth0 and remove the cable 3. dhclient will die compleatly in about 1 hour if the -1 is in options Actual Results: if running server, you need to restart net.eth0 Expected Results: wait for network to come back
However, our network scripts need to know that the dhcp attempt has failed. Instead, use ifplugd or netplugd to manage your wired connection. When the cable is plugged back in, it will re-launch your dhcp client of choice.