>> #!/bin/bash
>> #
>> PPPSTATUS=$(ifconfig -a|grep ppp0|awk '{ print $1 }')
>>
>> if [ ${PPPSTATUS} = 'ppp0' ]
>> then
>> echo PPP is UP
>> else
>> echo PPP is DOWN
>> fi
>
>Doesn't always work. It's possible for ifconfig to show the ppp0
>interface when the modem link is down.
>
>The only sure way is to ping the other end.
>
Not the only. One could scan ifconfig's output for 'MTU' setting, with
PPP it's rarely 1500 - with demand dialing feature of 2.3.5 it's 1500 when
modem is down and changes to meaningful value (296 in most cases is near
to optimum) when the link is up. In my case it works fine :-)
Best Regards,
Ilja V. Slepnev <[EMAIL PROTECTED]>
http://ccpc4.jinr.ru/ilja/
ICQ: 5433273
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]