On Thu, Feb 20, 2014 at 5:14 PM, Bryan Evenson <[email protected]> wrote:
> I am using busybox-1.20.2 on an embedded Debian Linux machine, and I have 
> configured Busybox to include ifplugd.  I would like ifplugd to do the 
> following:
>
> 1. When the Ethernet cable is plugged in, attempt DHCP on eth0
> 2. If DHCP fails, use a set static IP address
> 3. When the Ethernet cable is unplugged, unconfigure eth0
>
> At this point, ifplugd is not running.  After some poking around, I see that 
> there is no default daemon script for ifplugd included with Busybox.  I'm 
> assuming a script to do the above isn't that difficult, but I can't seem to 
> find any examples on how to do this.  Does anyone have a simple example that 
> I can go by?  I did see the example in the Busybox source under 
> examples/var_service/ifplugd_if, but I couldn't make any sense of what that 
> script did and how to make use of it.

It means that busybox/examples/var_service/README is badly located,
or badly written, or both.

Did you find it? If no, how this can e improved?
Please read it, and tell me where it is not clear.

> On a related note, I have eth0 setup in /etc/network/interfaces as:
> auto eth0
> iface eth0 inet dhcp
>
> If I want to use a static IP address if DHCP fails, do I need to add 
> something to /etc/network/interfaces, or is that something that would belong 
> in the ifplugd script?

If you want sane networking in a non-trivial situation,
I think ifup isn't the tool.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to