4 #***********************************************************************
7 CONFIG
=/etc
/ppp
/pptp.conf
10 if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
11 echo "$0: Cannot read configuration file '$CONFIG'" >& 2
18 # If no PPPD_PIDFILE, something fishy!
19 if [ ! -r "/etc/ppp/ppp-cable.pid" ] && [ ! -r "/var/run/ppp-cable.pid" ] ; then
20 echo "cable-status: Link is down (can't read pppd PID file )"
25 # Sigh. Some versions of pppd put PID files in /var/run; others put them
26 # in /etc/ppp. Since it's too messy to figure out what pppd does, we
28 for i
in /etc
/ppp
/ppp-cable.pid
/var
/run
/ppp-cable.pid
; do
31 netstat
-rn |
grep "$IF" > /dev
/null
32 /sbin
/ifconfig
$IF |
grep "UP.*POINTOPOINT" > /dev
/null
33 if [ "$?" != "0" ] ; then
34 echo "cable-status: Link is attached to $IF, but $IF is down"
37 echo "cable-status: Link is up and running on interface $IF"
44 echo "cable-status: Link is down"