[BusyBox] ifup, ifdown applets
Steven Scholz
steven.scholz at imc-berlin.de
Tue Nov 19 03:17:07 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 {}
>
> I just changed it to "cat /var/run/udhcpc.eth0.pid | xargs kill" as is
> done in a patch for bering linux's ifupdown
>
> If you could give it a try and check that it fixes that particular problem
> i would appreciate it.
Well,
I tried but udhcpc is not very impressed by the kill! :o)
For some reason I need "kill -9" to kill the udhcpc. However according to the
udhcpc sources it catches SIGTERM and does a exit_client(0)...
"cat /var/run/udhcpc.eth0.pid | xargs kill -9" does not work! I suppose due to a
problem (bug?) in xargs!
~ # cat /var/run/udhcpc.eth0.pid | xargs kill -s SIGTERM
xargs: invalid option -- s
BusyBox v0.61.pre (2002.11.18-13:00+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.
~ #
However, do we need pid files!?!?
Can't we just use pidof ???
Steven
More information about the busybox
mailing list