** Reply to note from "Jessen,  Per" <[EMAIL PROTECTED]>        Mon, 10 May 
1999 09:58:05 +0100

I've also had situations where diald left my connection up.  (Only a local
call so no big cost but it does tie up my incoming fax line)  I set up a
cron job to check if the line is over 3.6 hours (.15 days) old.  I did this
by using the ip-up script to create a file in /var/log/ipup with my address
etc.  (I'm on a dynamic connection and this gives a place to get my real ip
address)  ip-down script removes the file.

I then run the cron job every 30 minutes:

# This shuts down diald link if up too long
2,32 * * * * /usr/local/sbin/forcedialddown.pl


dads:~$ cat /usr/local/sbin/forcedialddown.pl
#!/usr/bin/perl -w
#
#Force diald line down if up too long in days.
$MAXAGE = .15;
if ((-e "/var/log/ipup") && ((-M "/var/log/ipup") > $MAXAGE))
        {`/usr/local/sbin/ddc down`;
        print "Link forced down - timeout! \n"}
exit
dads:~$

and it mails me a note telling me it had to force it down.  Happened only
three times in the last six months --but that seems important to me.  One
problem-- it doesn't know if the link is being used, ie ftp download or
such, so I manually touch or remove /var/log/ipup if I initiate such a
dowload and expect the link to be up over the timeout.

Dave Forrest
St. Louis, MO
"Those who don't read have no advantage over those who can't"

-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to