[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] delaybody configurability
On Sun, 2000-01-16 2000 23:11 +0000
Nick Drage <nick-drage@xxxxxx> wrote:
> On Sun, 16 Jan 2000, Dave Sherohman wrote:
> <snip>
> > Given that, so far as I know, diald doesn't report whether it was able to
> > create a successful connection or not, I have no way of automatically
> > handling this problem. (And I know I'm not the only one who has it - just
> > this morning, I say someone else with the same problem in
> > comp.os.linux.networking.)
>
> Wouldn't it be possible to make the execution of a command ( i.e., running
> fetchnews ) dependant on the string "ppp0" being part of the output of
> "ifconfig", that way it'll run if the ppp connection is up, it won't run
> if the connection is down.
Try:
if grep -q '^ppp' /proc/net/route; then
do_something;
fi
> I could probably hack together something very, very dodgy in a shell
> script to do this - but presumably there's something more elegant ( based
> on the code returned from "ifconfig | grep ppp" perhaps? ).
if ifconfig | grep -q ^ppp ; ...
Radek
--
All hope abandon, ye who enter here! (Dante Alighieri)
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list