Detecting link state in dhcpc...

David Daney ddaney at avtrex.com
Mon Feb 12 13:36:10 PST 2007


Denis Vlasenko wrote:
> On Monday 12 February 2007 18:00, MatthewLCreech at eaton.com wrote:
>> busybox-bounces at busybox.net wrote:
>>> In my case, I am talking about an embedded device that is
>>> essentially useless if not on a network also, so I definitely
>>> want to be able to take some action if the link goes down as
>>> well.  In my case it happens that I need to do this in static
>>> IP case also, so I have a link monitoring daemon that takes
>>> care of it, rather than adding it to DHCP.
>> FWIW, I also have an embedded device which needs this kind of behavior,
>> so I used netplugd:
>>
>> http://www.red-bean.com/~bos/
>>
>> The netplugd script that gets run when the carrier state changes either
>> starts/kills udhcpc, or it runs the appropriate ifconfig commands,
>> depending on how the device is configured.  It's an easy alternative to
>> modifying BusyBox, and also keeps things consistent when you're not
>> using DHCP.  (Which sounds like it might be similar to what you've
>> already done for the static case)
> 
> That's a good solution: add netplugd to bbox as a new applet.

I am abandoning my patch to add it to udhcpd.

Currently I am looking at running ifplugd to see how that works.  If it 
looks OK, I will add it or netplugd to busybox.

Thanks,
David Daney


More information about the busybox mailing list