[BusyBox] busybox 1.00-pre8 & DHCP Patch

Tony J. White tjw at webteam.net
Tue Mar 2 16:32:34 UTC 2004


On Tue, Mar 02, 2004 at 12:30:01AM -0700, Russ Dill wrote:
> > If you're referring to the show_usage() function in that file, it will still
> > function normally since show_usage() is only used if udhcpc is not built 
> > into busybox.  If that is the case, DEFAULT_SCRIPT will be defined and 
> > show_usage() will display the correct udhcpc script.
> > 
> > Am I missing something?
> 
> my bad, I try to keep the usage.h and show_usage() in sync, I hadn't
> thought about it being desirable to make them a little different. You
> might consider changing it to:
> 
> "\t-s,\t--script=file\tRun file at dhcp events (default: "
> CONFIG_UDHCPC_SCRIPT_PATH")\n"

I was going to do that originally, but for some reason I thought the compiler
would not be able to use a define inside of a #define.  Shows what I know, 
because it works.

> [setting CONFIG_UDHCPC_SCRIPT_PATH for udhcpc outside of busybox in the
> libbb_udhcp.h compatibility header]

I totally overlooked the libbb_udhcp.h header.   I don't think it's 
necessary to set the default CONFIG_UHDCPC_SCRIPT_PATH in this file since
the busybox configuration will always set it to something if udhcpc is
being built.

I did however move the CONFIG_INSTALL_NO_USR test from libbb_udhcp.h to the
Config.in file.  So when someone changes the CONFIG_INSTALL_NO_USR option
in menuconfig, the CONFIG_UDHCPC_SCRIPT_PATH default updates automatically
unless they've manually changed that value.


> Might be considered overkill though since it would seem a little silly
> to list all the default options in the help. However, since the script
> is the thing so many people miss (I've even had people sending me
> patches to modify behavior that is easily performed in the script), it
> might be a good idea to point it out. Any opinions?

No, you are right.  The script requirement can be confusing because ISC DHCP
handles that internally and that's what most people are used to. 
So printing this script information in usage is important in my opinion.

I think it would also be helpful if 'udhcpd -h' printed usage information if 
busybox is build with verbose applets.  At least to tell where it's looking
for udhcpd.conf if not print out a list of all the udhcpd options.  
Do you see any problem with that?

My newest patch is available here:

http://tjw.org/udhcp/busybox-1.00-pre8-udhcp3.patch 
 

-Tony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20040302/b1310b62/attachment-0002.pgp 


More information about the busybox mailing list