for those of us too lazy to set up diald, there's always the question
of turning off ppp connections when we're tired but have a large
ftp session going, this script might be of use:
#/bin/sh
echo -e "time\t total\t\tdelta\tdeltas below 30 (exit when > 4)"
o=0
f=0
while /sbin/ifconfig | grep -q ppp0; do
n=`/sbin/ifconfig ppp0|grep RX|cut -d: -f2|cut -d\ -f1`
if [ $[ $n - $o ] -lt 30 ]; then
f=$[ $f + 1 ]
if [ $f -gt 4 ]; then
/sbin/ifdown ppp0
fi
fi
date "+%T $n%t%t"$[ $n - $o ]"%t$f"
o=$n
sleep 15
done
i save this under pppwait in my bin dir.
kevin
--
kevin at suberic.net "nobody likes a monkey on their back. i had
fork()'ed on 37058400 three. they were cramping my style. it was
meatspace place: home time to get rid of them."
http://suberic.net/~kevin --porter, "payback"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!