I would like to configure eth0 on my BusyBox based Linux system to try and get a DHCP lease for 5 times, then run in the background forever if it doesn't get an IP after those 5 tries (i.e. does not inhibit the rest of the applications starting up).
I have been experimenting with various options via udhcpc_opts in /etc/network/interfaces, e.g.
auto eth0
iface eth0 inet dhcp
udhcpc_opts --retries 5 --background --syslog
however I can't work out how to make it stay in the background trying indefinitely. I.E. I want 5 initial tries, then an infinite no. of retries in the background. Can anyone help?
Best Answer
I ended up modifying the BusyBox config., which was automatically adding the '-n' option when launching the DCHP client. With this removed, the client goes into the background if it does not immediately get an address.