dhclient exits when dhcp server is offline on boot

Bug #1125066 reported by Jeroen
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When raspbian boots it tries to get a lease from the DHCP server with dhclient. Unfortunately dhclient is started with the -1 option, causing it to exit when getting a lease fails. This causes raspbian never to come back online without a reboot or manual starting dhclient.

1. Start Raspbian attached to a switch which is on and don't run a dhcp server on the network
2. after 5 minutes start DHCP server
3. wait for the raspbian device to come online, it won't...

Remove the -1 option while starting dhclient on boot, eventually adapt the timeout and retry values in /etc/dhcp/dhclient.conf

Revision history for this message
Jeroen (jeroenst) wrote :

See also: http://raspberrypi.stackexchange.com/questions/3332/alter-dhclient-to-retry-fetching-ip-address

Looks like the -1 option is hardcoded in /sbin/ifup binairy, so users can't change it without recompiling..

Revision history for this message
Jeroen (jeroenst) wrote :

A workaround is to create a wrapper script by renaming /sbin/dhclient to /sbin/dhclient-bin and but the text below in /sbin/dhclient and afterwards chmod it to 777:

/sbin/dhclient-bin -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.