On Wed, 22 Jun 2011 04:27:10 +0200, Denys Vlasenko
<[email protected]> wrote:
>There are two examples in http://git.busybox.net/busybox/tree/examples/udhcp:
>simple.script, or sample.script+sample.*
>
>Use either of them as a basis for your own scripts.
>
>Another example is in http://git.busybox.net/busybox/tree/examples/var_service
>(read the README, then check dhcp_if subdirectory)

Thanks. The following worked to get an IP configuration:
===============
#First, clear eth0
root:/var/tmp> ifconfig eth0 down

#Next, get IP configuration
root:/var/tmp> chmod +x simple.script
root:/var/tmp> udhcpc -i eth0 -p /var/run/udhcpc.pid -s
/var/tmp/simple.script
root:/var/tmp> ifconfig
===============

I didn't find a tutorial on udhcpc, so have a few questions, though:

1. If simple.script works, what are the other scripts (sample.*) used
for?

2. What are var_service files?

3. Am I correct in understanding that udhcpd.conf is for the DHCP
server, not the client?

4. If udhcpc only calls scripts, what's the point of udhcpc?

5. What is the right way to release IP configuration and kill udhcpc?

I tried this, but eth0 still has an IP configuration:

root:/var/tmp> udhcpc deconfig -s /var/tmp/simple.script
root:/var/tmp> ifconfig

6. "ps aux | grep dhcp" shows that the process is still running: Why?
Should I kill it with "killall" or launch it with "-q" ("Quit after
obtaining lease")?

Thank you for any help.

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to