Quoting [EMAIL PROTECTED], from the post of Tue, 20 Jun:
>
> On second thought I didn't catch that the previous script is run at
> time periods.
>
> What I was looking for was it to be event driven not time driven.
at a client of mine, the line kept dying, and the ppp/options
"persistant" parameter didn't seem to do the trick for more than a few
failures, and pppd would freeze. ifconfig still shows ppp0 is up but the
line would not really pass packets.
so I wrote this little keepalive, it's supposed to be invoked from
wherever you want and forked to the background (it won't BG itself),
also it means I dropped "persistant" from the options.
enjoy:
------------8<---- chop this off! -------8<-----------
#!/bin/bash
while : ; do
if ! pgrep pppd ; then
pon
fi >/dev/null
sleep 30
done
------------------------------------------------------
to explain: pon is the Debian ppp starter. you can instead run "pppd
call $provider" to run a specific dial script, where the specific
options are at /etc/ppp/peers/$provider and they override
/etc/ppp/options, naturally.
is it smart or impressive? no, but it does the job. If I find pppd
getting stuck again, I'll rewrite it to also perform ping tests.
--
The fugitive
Ira Abramov
http://ira.abramov.org/email/
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]