Subject: Re: RE-dialing SLIP/PPP (not dial on demand)

From: [email-masked] (Scott Mann)
Date: 5 Mar 1995 21:57:33 GMT

Scott J. Ellentuch ([email-masked]) wrote:
: On 3 Mar 1995, Michael Meissner wrote:

: > In article <[email-masked]> [email-masked] (Scott Mann) writes:
: > 
: > | Phil Howard ([email-masked]) wrote:
: > | 
: > | : Ideas?  Particular programs to suggest?
: >
: 	(Sunsite ls removed)
: >
: 	This also may not be very elegant, but I use this on an AIX box and 
: expect it will work on dip.  Pseudocode follows:

: 	PING Well.Known.Host.Thats.ALWAYS.up 5 times > SLIPCHECK
: 	IF WC -L of SLIPCHECK isn't a certain number of lines
: 		RESET SLIP by shutting it down
: 		BRING SLIP back up
: 	ELSE
: 		echo "This_program" | at now + 5 minutes

: 				Scott
Here is a short program that I am using to keep my slip up:

/* checklink.c                -- William Gladnick               */
/* This program assumes you have one modem line dedicated       */
/* to SLIP. If the modem is not locked, dip needs to be run.    */
/* The time between checks is 10 seconds but this can be        */
/* changed easily. Change /root/server.dip to your script name. */ 
#include <stdio.h>
main(){
int     n=0;
FILE    *inf;
do{
if((inf = fopen("/var/spool/uucp/LCK..modem","r")) == NULL)
                system("/sbin/dip /root/server.dip");
else
                fclose(inf);
sleep(10);
}while(n==0);
}