udhcpc - script isn?t called

Denys Vlasenko vda.linux at googlemail.com
Mon May 26 16:12:20 UTC 2008


On Monday 26 May 2008 15:52, Manuel Sahm wrote:
> Hello,
> 
> thanks I´m using the latest released version of busybox 1.10.2....
> 
> 1.) When is the script of udhcpc executed ? (which "events")
> 
> 2). How could I realiezr the following sequence:
> 
> a.)
>  - system boots - udhcpc -i eth0 -s /etc/simple-script
>  - system doesn´t got an ip from an dhcp server - use static one like 
> 192.168.3.10

Run udhcpc with -n option, so that it fails is lease can't be obtained.

> b.)
> - system boots - udhcpc -i eth0 -s /etc/simple-script
> - system got an ip from an dhcp server
> - I unplug my cable and plug the cable in another system with another 
> dhcp server is running
> [I want no my system to get a new ip from the new DHCP server...]

Run ifplugd:

http://0pointer.de/lennart/projects/ifplugd/

and make it kill and restard udhcpd whenever cable is unplugged.
--
vda



More information about the busybox mailing list