[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] how to detect a connection?
Hi,
On Fri, Dec 15, 2000 at 03:56:00AM +0100, Helmut Karlowski wrote:
> How can I wait for a ppp-connetion to establish?
>
> Currently I'm using some kind of polling:
>
> x=0
> while ! ( route | grep -q ppp ) && [ $x -le 5 ]
> do
> let x=x+1
> sleep 15
> done
>
> And looking for something more elegant.
>
> -Helmut
Read the manpage pppd(8) and write scripts /etc/ppp/ip-up and
/etc/ppp/ip-down to react to the link being brought up or down.
I can mail you a preformatted version of the manpage if you don't have
man/groff.
For a quick start without the manpage:
#! /bin/sh
# This is /etc/ppp/ip-up
#
echo $* >/tmp/ip-up.arguments
You can probably guess what the arguments are then.
Ciao
Guido