Best way to use dhcpc / avahi without delaying other init scripts ?

Peter Korsgaard jacmet at sunsite.dk
Tue Apr 30 19:25:35 UTC 2013


>>>>> "Mark" == Mark Jackson <mpfj-list at newflow.co.uk> writes:

 Mark> I'm trying (and failing !!) to work out how best to use dhcpc and avahi
 Mark> together.

 Mark> Ideally I'd like udhcpc to start up, try to get a lease and, if the
 Mark> lease request fails, use avahi to get a local ip address.

 Mark> I have this working, but the dhcp request can taken some time (or even
 Mark> fail if no dhcp server is present), and I am seeing delays of several
 Mark> seconds before my other init scripts run.  I have dual ethernet ports
 Mark> leading to about a 10seconf delay if no dhcp server is present.

 Mark> To prevent other init scripts from being delayed, udhcpc should
 Mark> instantly go into background mode (see [1]).

The normal approach is to use ifplugd (the busybox applet) to run the
ifup in the background when it detects a link, and not stall the rest of
the boot process.

-- 
Bye, Peter Korsgaard


More information about the busybox mailing list