Try this! This simple script would do!


--------------- Cut here ------------------------------------
#!/bin/bash
#
PPPSTATUS=$(ifconfig -a|grep ppp0|awk '{ print $1 }')

if [ ${PPPSTATUS} = 'ppp0' ]
then
        echo PPP is UP
else
        echo PPP is DOWN
fi

--------------- Cut here ------------------------------------


Udayabaskar Nachimuthu



Stefan Frank wrote:
> 
> Hi,
> 
> i'm looking for a way to check within a shell script wheter a PPP connection
> is already up or not. To check for a /var/run/ppp0.pid file did not help, as
> this file is already created when the modem is still dialing my ISP's
> number.
> 
> TIA, Stefan
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to [EMAIL PROTECTED]


-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]

Reply via email to