#!/bin/sh
#	ppp-go
#
#	script to (re)initiate a connection using a Speedtouch USB & B.
#	Papillault's driver to check wether it is established or not
#
#							Olivier Mehani, 2002
#							   <shtrom@ssji.net>
#
#	$Date: 2002/11/10 21:10:47 $
#	$Revision: 1.7 $
#

waittime=60	#time to wait before checking the connection

logterm=/dev/tty7

if [ -x ###PPPDIR###/araw-up ]; then
    echo Running the araw-up script...
    ###PPPDIR###/araw-up
fi
echo -n Starting pppd...
ps -ef | grep pppd | grep -v grep > /dev/null 2>&1
while [ ! $? == 0 ]; do
    echo -n .
    pppd call adsl > $logterm 2>&1
    sleep $waittime
    ps -ef | grep pppd | grep -v grep > /dev/null 2>&1
done
echo " done"
