Am Freitag, den 23.03.2007, 13:09 +0100 schrieb Wolf, Josef: > Thanks for the answer, Erwin! > > Erwin Authried wrote: > > > > I'm trying to move from dhcpcd-new to busybox's udhcpc. The first > > > difference I noticed is that udhcpc won't work unless > > > "ifconfig eth0 up" is issued before udhcpc is invoked. dhcpcd-new > > > don't need the ifonfig command. > > > > > > Is this the way it should be? Are there any problems (e.g race > > > conditions, since bringing up the interface is not atomic anymore) > > > to be expected from that? > > > > The busybox udhcpc relies on an action script (default > > = /usr/share/udhcpc/default.script). The interface is brought up there > > in deconfigured state: > > I am aware of that. But the problem is not with the script. udhcpc > calls the script _after_ it has acquired the lease. My problem is that > if the interface is down, then udhcpc will fail to get a lease in the > first lace. It therefore _never_ calls the script with the "bound" > option.
the script is called multiple times, the first time it is called after udhcpcd has been started. You can try that to see how it works: ==> /usr/share/udhcpc/default.script <== #!/bin/sh echo DEFAULT SCRIPT: $* case $1 in deconfig) ifconfig $interface 0.0.0.0 ;; renew|bound) ifconfig $interface $ip ;; esac exit 0 > > BTW: How do I configure udhcpc to send the hostname to the server? The > "-H hostname" option seems to _request_ a hostname from the server. > Why is -H taking an argument then? no, that should be the client's hostname, this is sent to the dhcp server, as far as I know. Regards, Erwin -- Dipl.-Ing. Erwin Authried Softwareentwicklung und Systemdesign _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev