[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Introduction.



> Probably wan't to make sure you've got an address. Here's one variant.
> 
> $  /sbin/ifconfig ppp0 | grep 'inet addr:' | sed 's=.*inet
> addr\:\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*=\1='
> 
> That's all one line. It shouldn't return anything if you don't have an
> inet addr for ppp0.  Otherwise, it'll return the address.

#!/bin/sh
if [ -e /var/run/ppp0.pid ] ; then
	echo "Your PPP connection is up."
else
	echo "Your PPP connection is down."
fi

HTH.

-jg

--
Jeremy L. Gaddis     <jlgaddis@blueriver.net>




Reply to: