udhcp and busybox
Rob Landley
rob at landley.net
Sun Mar 26 13:22:12 PST 2006
On Sunday 26 March 2006 3:22 pm, Devin Bayer wrote:
> On Mar 26, 2006, at 12:13, Rob Landley wrote:
> > On Saturday 25 March 2006 11:30 pm, Devin Bayer wrote:
> >> 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:
> >>
> >> -g set the gateway if no gateway is set on another interface
> >> -o delete any other gateways first
> >> -d edit /etc/resolv.conf
> >> -V be verbose
> >
> > Hadn't planned on getting that fancy. If you need that, use a
> > shell script.
> > The dhcp client can easily export all the data it collected from
> > the server
> > into either command line arguments or environment variables (I
> > haven't looked
> > at what it's currently doing yet). The common case is "dhcp
> > interface" and
> > it responds by doing "ifconfig interface xx.xx.xx.xx/xx && route
> > add default
> > gw xx.xx.xx.xx", which should require no external dependencies or
> > configuration.
>
> If you do what you suggest and set a gateway when another is already
> set, you'll bork the whole system.
I do it all the time, actually, and the tools I'm using delete the old
gateway. I can ifconfig the interface down first to be sure, though.
If somebody runs a dhcp client on eth0 and another one on eth1, they'll
probably need a script. That's not my problem.
> So you have two options - either
> delete the current gateway first or don't add another gateway. I
> agree, using the udhcp nameservers is not as important.
No, if it supplies one I'll happily modify /etc/resolv.conf. I can see a
command line option telling it not to do that, though.
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list