udhcpc - script isn?t called
Denys Vlasenko
vda.linux at googlemail.com
Mon May 26 12:59:48 UTC 2008
On Monday 26 May 2008 14:22, Manuel Sahm wrote:
> OK, example:
>
> 1.) My system is booting - udhcpc is started....what happens if no cable
> is plugged...I think the udhcp is waiting for an event. ?
No. It will be trying to send discover packets anyway.
> 2.) [cable plugged]What happens if no dhcp server is running and no ip
> is got ? - Is there a TIMEOUT that you have to wait to get an ip address
> from a dhcp server ?
Unless -n or -q is given, udhcpc will try forever.
You need to read help text:
# udhcpc --help
BusyBox v1.10.0 (2008-03-22 15:35:10 CET) multi-call binary
Usage: udhcpc [-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]
[-p pidfile] [-r IP] [-s script] [-O dhcp-option]...
-V,--vendorclass=CLASSID Vendor class identifier
-i,--interface=INTERFACE Interface to use (default eth0)
-H,-h,--hostname=HOSTNAME Client hostname
-c,--clientid=CLIENTID Client identifier
-C,--clientid-none Suppress default client identifier
-p,--pidfile=file Create pidfile
-r,--request=IP IP address to request
-s,--script=file Run file at dhcp events (default /usr/share/udhcpc/default.script)
-t,--retries=N Send up to N request packets
-T,--timeout=N Try to get a lease for N seconds (default 3)
-A,--tryagain=N Wait N seconds (default 20) after failure
-f,--foreground Run in foreground
-b,--background Background if lease is not immediately obtained
-S,--syslog Log to syslog too
-n,--now Exit with failure if lease is not immediately obtained
-q,--quit Quit after obtaining lease
-R,--release Release IP on quit
-O,--request-option=OPT Request DHCP option OPT from server
-a,--arping Use arping to validate offered address
> 3.) If no ip is got from a dhcp server, is it possible to set an static
> ip address via ifconfig ?
How would you define "no ip is got from a dhcp server"? No ip is obtained
in 1 second? 5 seconds? 500 seconds?
--
vda
More information about the busybox
mailing list