udhcp and busybox

Rob Landley rob at landley.net
Mon Mar 27 09:59:15 PST 2006


On Sunday 26 March 2006 11:17 pm, Paul Fox wrote:
>  > On Mar 26, 2006, at 9:26, Paul Fox wrote:
>  > >> Hello Rob.  If you are working on shrinking udhcp, I have a feature
>  > >> request.  Could it be made to not require a shell script.  I imagine
>  > >> 90% of people using it just need to set the gateway, IP address, and
>  > >> DNS servers. So it could have a few new options:
>  > >
>  > > what's wrong with needing the script?  all it seems you're doing is
>  > > hard-coding a bunch of actions that may or may not be suitable or
>  > > complete for all users.
>  >
>  > It first hit me when I was using buildroot - all of busybox worked
>  > right after installing except udhcpc, which had the following issues:
>  >
>  > 	* it required a script, which isn't installed by buildroot
>
> sounds like a bug in buildroot, no?

No, it's a bug in the dhcp client for needing it.  If even init can avoid 
using /etc/inittab, there's no excuse for dhcp needing a script.

>  > 	* changing the script to be correct took over an hour
>  >
>  > So it's a matter of usability. I shouldn't have to learn an API just
>  > to get an IP address.  I believe it can work out of the box for most
>  > users.  So it should.  Hardcoding the actions in C is just a simpler
>  > way to achieve that.  It doesn't require changes to the install and
>  > is less prone to breakage.
>
> clearly if you can do what you want while maintaining some semblance
> of backward compatibility so that scripts continue to work, and
> if a working script remains in the bb tree, then there's not much
> to argue with.  i've just never used udhcp on a system that didn't
> have special networking needs.

I was happy to leave this thing alone indefinitely and focus on higher 
priority things, until my hand was forced.  But I can't even build with the 
tree spliced together like this, and even if I could it's obnoxious.  I 
objected at the time.  For example, if I clean up the code to use 
bb_getopt_ulflags() I break some unrelated project.  That's evil, and it's 
NOT MY PROBLEM.

My objections were ignored, and now I'm making the problem _GO_AWAY_.  And the 
since only way to do that is write a new one, that's what I'm doing.

Rob
-- 
Never bet against the cheap plastic solution.


More information about the busybox mailing list