[BusyBox] ifup, ifdown applets

Steven Scholz steven.scholz at imc-berlin.de
Mon Nov 18 04:55:03 UTC 2002


Glenn McGrath wrote:
> 
> On Mon, 18 Nov 2002 12:13:00 +0100
> Steven Scholz <steven.scholz at imc-berlin.de> wrote:
> 
> > Glenn McGrath wrote:
> > >
> > > Ive just commited those applets based on the debian ifupdown package.
> >
> > On my machine an "ifdown -f -v eth0" results in
> >
> > ifdown: Configuring interface eth0=eth0 (inet)
> > ifdown: cat /var/run/udhcpc.eth0.pid | xargs -i kill -TERM {}
> > xargs: invalid option -- i
> > BusyBox v0.61.pre (2002.11.17-14:39+0000) multi-call binary
> >
> > Usage: xargs [COMMAND] [-prt] [ARGS...]
> >
> > Executes COMMAND on every item given by standard input.
> >
> > Options:
> >         -p      Prompt the user about whether to run each command
> >         -r      Do not run command for empty readed lines
> >         -t      Print the command line on stderr before executing it.
> >
> > since busybox xargs doesn't know -i option...
> >
> > BTW what happens if there is no network connection during boot, i.e
> > udhcp fails. Is there a way of using a default configuration?
> >
> 
> hmm, i hadnt tested it with dhcp, "cat /var/run/dhclient.%iface%.pid |
> xargs -i kill -TERM {}" is hard coded :(
> 
> Ive started to rewritting ifupdown, its going to take a while though, it
> was probably a mistake to commit the current ifupdown.
No! Definitly not!

This way we could express some wishes! :o)

So first: Do you think it's nessesary to use a pid file? I don't like that since
I am using JFFS2 as root fs and don't want too much writing happen...
And if the system crashes there are still old, invalid pid files around...

Second: Maybe we should at least use defines for hardcoded stuff. I am thinking
of the udhcp script file. And of course it should be the same in the udhcp
source and in the ifupdown source...

Third: What about using a default if DHCP fails? I want to use udhcpc with
option "-q, --quit Quit after obtaining lease" only on boot. So when there's no
network connection while booting the interface doesn't get configured at all...

What do you think?

Steven



More information about the busybox mailing list