I've had issues with WAN IPs and dhcpcd causing me to not have internet after a shutdown. This led me to try out 'dhclient' module for DHCP and it has been working much better. The issue I found is that due to some ISP downtime, an IP renewal failed, which caused 'dhclient' to exit for that interface. Upon further examination, the '/lib/netifrc/net/dhclient.sh' script calls the binary with "-1" parameter, which causes an exit after failure to renew or acquire an IP. This is highly undesirable, as it will mean 'dhclient' will not keep retrying to acquire IP and the box will need to be manually intervened to restore connectivity.
Without this -1 param, starting the service with cable unplugged still reports "received address [ok]". Do you have any ideas to exit with failure code for the initial startup but not exit later for a temporary failure to renew?
I think you're correct, this is almost certainly a bug in DHCPCd. The issue was that a renewal failed a couple of minutes after ACK the IP used before the downtime. So, the interface was properly configured which should not exit after subsequent errors: -1, --oneshot Exit after configuring an interface. Use the -w, --waitip option to specify which protocol(s) to configure before exiting. Should I submit this as a bug on DHCPCd? Best regards
Forget when I mentioned 'DHCPCDd' on the previous comment, should have read 'dhclient'. I see the following: '-1', by the manual is supposed to fail with failure code 2 - so what you mention is a bug somewhere. In the manual, I don't see any other options worth mentioning.
Duplicate of #417365, if I'm not mistaken.
*** This bug has been marked as a duplicate of bug 417365 ***