If you are using monitoring software which needs to be know an actual
ppp unit number, I suggest you use the `linkname' option to pppd
(versions 2.3.9 or later). If you use `linkname blah' when you start
pppd, it will create a /var/run/ppp-blah.pid file. Initially this
will contain one line with the pppd's process ID. When pppd has got
to the point of allocating itself a network interface unit, it will
rewrite the /var/run/ppp-blah.pid file with two lines, the second of
which gives the interface unit name. So you could do something like
this in a shell script:
LINKNAME=blah
pidfile=/var/run/ppp-$LINKNAME.pid
if [ -f $pidfile -a `wc $pidfile` >= 2 ]; then
pppunit=`tail -1 /var/run/ppp-$LINKNAME.pid` # e.g. ppp0
monitor -i $pppunit
else
echo "PPP link $LINKNAME is not up."
fi
Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]