Detecting link state in dhcpc...
MatthewLCreech at eaton.com
MatthewLCreech at eaton.com
Mon Feb 12 17:00:47 UTC 2007
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)
--
Matthew L. Creech
More information about the busybox
mailing list