Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 1995 09:03:12 -0500 (CDT)
From:      Mike Pritchard <mpp@legarto.minn.net>
To:        vrozma01@barney.poly.edu (VyacheslavS. Rozman)
Cc:        questions@freebsd.org
Subject:   Re: PPP redial
Message-ID:  <199506101403.JAA15530@mpp.com>
In-Reply-To: <Pine.SOL.3.91.950609014303.18827A-100000@barney> from "VyacheslavS. Rozman" at Jun 9, 95 01:45:58 am

next in thread | previous in thread | raw e-mail | index | archive | help
>  I am using PPP account, and sometimes it is very difficult to connect to 
>  the server because the line is busy.  I have to redial many times.  I would 
>  greately appreciate it if someone could help me to establish an 
>  automatic redial feature.
>  Thank you for your time.
>  Slava.  

Here are the guts of my PPP connection script that I run whenever I want 
to startup my PPP link.  If the connection fails (line busy, modems
wouldn't talk, whatever) it will sleep for a while and retry everything.
scripts.

---cut here---
#!/bin/sh
#
# startppp [-v]
#
# -v = Call chat with "-v" to produce verbose output to help debug
#      connection problems.

DEBUG=
set -- `getopt tv $*`
if [ $? -ne 0 ]
then
	echo "usage: startppp [-v]"
	exit 1
fi
for i
do
	case "$i"
	in
		-v)
			DEBUG=-v
			shift;;
		--)
			shift
			break;;
	esac
done
(
while true
do
	pppd -detach connect "chat $DEBUG -f /etc/ppp/ppp-chat" /dev/modem 115200
	if [ $? -eq 0 ]
	then
		break;
	fi
	sleep 60
	logger -p local0.info -t PPP Retrying PPP connection
done
) < /dev/null > /dev/null 2>&1 &
-- 
Mike Pritchard
mpp@legarto.minn.net
"Go that way.  Really fast.  If something gets in your way, turn"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506101403.JAA15530>