More bbsh design notes.
Rob Landley
rob at landley.net
Thu Sep 14 18:34:58 UTC 2006
On Thursday 14 September 2006 3:46 am, Ian Oliver wrote:
> > Shells do goto? (Checks susv3 "Shell command language" page... Search
> > for "goto" not found. Checks bash man page... Does not include the
> > word "goto".) Apparently not.
>
> Hmmm, OK, probably a good thing. As long as return is implemented for
functions, which
> it doesn't seem to be in hush (unless I'm wrong about this too!)
I can make shell functions return in bbsh, sure. I vaguely suspect it's in
SUSv3 once I read that far...
> > And the shell returning 0 would mean it wouldn't have to call ifconfig,
route,
> > or write resolve.conf. It could veto it by returning 1 (or do it itself),
> > and the dhcp client wouldn't do this until _after_ the script returned, so
if
> > you wanted to add firewall rules before the interface went up, you could.
>
> There are also all the other cases where udhcpc calls the external
script/program to
> consider. But I guess it's all just using ifconfig/route to set things up
and rip them
> down.
What a dhcp client fundamentally _does_ is grab and defend an address from a
server, and set the address, gateway, and nameserver information related to
that server.
Currently, udhcpc needs an external script to actually do this. I don't like
that.
> > And yeah, it could be a CONFIG option.
>
> BTW, did I mention that on this here embedded box in front of me, the Korean
engineers
> who hacked all the calls to ifconfig, route, etc. into udhcpc also got it to
directly
> write the IP address and netmask into known places in memory? So, I'll be
needing
> config options for where to write the values, and I'll need them endian
swapping. :)
A) No, you won't.
B) Can we have the patch? (Busybox is GPL, doo dah, doo dah...)
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list