/proc/<pid>/cmdline and udhcpcd

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Tue Mar 25 21:52:14 UTC 2014


Trying to move from:

	udhcpc -H foo

to:

	udhcpc -x hostname:foo

following the advice:

	udhcpc: option -h NAME is deprecated, use -x hostname:NAME

This is "BusyBox v1.20.2".

I find out that using that option:

	-x hostname:foo
	           ^

shows up in /proc/<pid>/cmdline as:

	-x hostname foo
	           ^

and that screws up a few things around here :(

Now I wonder what's going on.  What should I put the blame on?
A simple test shows that shouldn't happen.  Run the attached script
with:

	/path/to/cmdline2.sh -x hostname:foo

and you'll see what I mean.  The output from the script looks exactly
like I'd expect it to.

What's changing the /proc/<pid>/cmdline in the busybox udhcpcd case?
Looking around in the process table I see other daemons showing
correct option arguments:

	/usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:105
	                                             ^
Where should I seek enlightment?


Cheers,

-- 
Cristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmdline2.sh
Type: application/x-sh
Size: 253 bytes
Desc: 
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20140325/5172edfb/attachment.sh>


More information about the busybox mailing list