Busybox Update Problem

Denys Vlasenko vda.linux at googlemail.com
Thu Sep 25 21:28:28 UTC 2008


On Wednesday 24 September 2008 00:19, Michael Davis wrote:
> I started messing around with the rc.sysinit file thinking that maybe 
> something had changed between the different versions.
> I found the problem was with this section
> 
> if [ "x`grep ip= /proc/cmdline`" = "x" ]
> then
> udhcpc -i eth0 -b -p /var/run/udhcpc.eth0.pid >/dev/null 2>&1
> fi
> 
> So I tested the udhcpc with the above command in a normal terminal and 
> it doesn't go to the background.
> I then tested it without sending the output to /dev/null.  I get this 
> output.
> udhcpc (v1.11.2) started
> Sending discover...
> Sending select for 192.168.1.169...
> Sending select for 192.168.1.169...
> Sending select for 192.168.1.169...
> Sending discover...
> Sending select for 192.168.1.169...
> Sending select for 192.168.1.169...
> Sending select for 192.168.1.169...

This is interesting. Your DHCP server _does_ offer you an IP,
but then it doesn't ACK it. udhcpc does not expect such a loop,
and never invokes
"-b,--background Background if lease is not immediately obtained"
code.

Can you capture "tcpdump -nlieth0 -s0 port 67 or port 68" output
while it runs?

Please try attached patch, does it make udhcpc background?

On a side note, the way you do network config is fragile.
Don't you see that hardcoding eth0 interface name is asking
for trouble in multihomed case? What will happen if
/proc/cmdline would accidentally contain e.g. "turnip=big"
substring?
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7.patch
Type: text/x-diff
Size: 914 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080925/ff28d922/attachment.bin 


More information about the busybox mailing list