busybox udhcpd not starting

Denys Vlasenko vda.linux at googlemail.com
Tue Nov 3 15:46:18 UTC 2009


On Tue, Nov 3, 2009 at 4:38 PM, Deva <pdydeva at gmail.com> wrote:
> Hi,
> Can someone guide me as how to start the busybox udhcpd daemon at the boot
> up.

# udhcpc --help
Usage: udhcpc [-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]
	[-p pidfile] [-r IP] [-s script] [-O dhcp-option]... [-P N]

	-V CLASSID	Vendor class identifier
	-i INTERFACE	Interface to use (default: eth0)
	-H,-h HOSTNAME	Client hostname
	-c CLIENTID	Client identifier
	-C		Suppress default client identifier
	-p file		Create pidfile
	-r IP		IP address to request
	-s file		Run file at DHCP events (default /usr/share/udhcpc/default.script)
	-t N		Send up to N request packets
	-T N		Try to get a lease for N seconds (default 3)
	-A N		Wait N seconds (default 20) after failure
	-O OPT		Request DHCP option OPT (cumulative)
	-o		Don't request any options (unless -O is also given)
	-f		Run in foreground
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	-b		Background if lease is not immediately obtained
	-S		Log to syslog too
	-n		Exit with failure if lease is not immediately obtained
	-q		Quit after obtaining lease
	-R		Release IP on quit
	-P N		Use port N instead of default 68
	-a		Use arping to validate offered address

> Whenever I use the following command in init.rc, I get the below mentioned
> error.
>
> command used:
> service udhcpd /system/bin/busybox udhcpd
>     class post-zygote_services
>     oneshot
>
> error seen:
> init: waitpid returned pid 791, status = 00000000
> init: process 'udhcpd', pid 791 exited

Of course it exited. You did not give it an -f "Run in foreground" flag,
so it forked, child backgrounded, and parent exited.
It's a daemon. Daemons work that way.

--
vda


More information about the busybox mailing list