From a shell script you can check the output of /sbin/ifconfig. Here are two different ways you could do that:
Code:
#!/bin/sh
if [ -z "`/sbin/ifconfig | grep ppp`" ]; then
echo "Dialup connection not established"
else
echo "Dialup connection established"
fi
if [ -n "`/sbin/ifconfig | grep ppp`" ]; then
echo "Dialup connection established"
else
echo "Dialup connection not established"
fi