Subject: Re: "smart" ppp scripts?
To: None <port-mac68k@NetBSD.ORG>
From: Steve Carlson <stevec@accessone.com>
List: port-mac68k
Date: 03/14/1997 21:00:43
Hi,
I myself haven't quite figured out the whole pppd thing but wouldn't
setting the lcp-echo-interval to a reasonable amount and setting the
"disconnect" option in the /etc/options file to a script that would kill
the current pppd and exec ppp-up do the same thing?
--
Steve Carlson
stevec@accessone.com
On Fri, 14 Mar 1997, Brian Andresen wrote:
> On Fri, 14 Mar 1997, synapse wrote:
>
> > i was wondering if the ppp scripts on the macbsd.com server were "smart"
> > and redialed when disconnected (by remote connection, or modem shut off,
>
> Somewhat following a suggestion on netbsd-help (or netbsd-users?) and
> somewhat hacking on my own, I've pieced together a "pppd daemon". I guess
> that would be "pppdd". ;-)
>
> #!/bin/csh
>
> while (1)
> set p=`/usr/local/bin/newping -o -c 3 198.93.80.102 |& grep -c route`
> if ( $p != 0 ) then
> # It's down!
> echo "IP link down - restarting PPP" >> /var/log/ppp
> set p=`cd /proc; grep -l '^pppd' */status`
> if ( $p != "" ) then
> kill `cat /var/run/ppp0.pid`
> endif
> sleep 3
> stty -f /dev/tty00 clocal
> pppd
> endif
> sleep 900
> end