[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] how to detect a connection?



Hi,

I don't know if this is really any cleaner, but you could do a "ping" to
an address on the other side of the PPP link and then detect if you get an
actual response or a "network unreachable" error.

If you wanted a real program instead of a shell script, something similar
could still be done.

thanks,
   noah silva

On Fri, 15 Dec 2000, 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
> 
> 
>