Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 1995 12:48:02 -0800 (PST)
From:      Duane Ellison <duane@gargamel.ptw.com>
To:        dlr <dlr@netcom.com>
Cc:        questions@FreeBSD.org
Subject:   Re: ping under freebsd
Message-ID:  <Pine.BSF.3.91.950324124241.118A-100000@saber.ptw.com>
In-Reply-To: <199503232141.NAA05443@netcom.netcom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Here is the script I use to check and connect.

# getmail
/usr/local/bin/connect   
pid=`ps ax | grep pppd | grep -v grep  | awk '{print $1;}'`
while
	ps ax | grep pppd | grep -v grep > /dev/null
do
	if ifconfig ppp0 | grep inet > /dev/null; then
		sendmail -q
		/usr/local/bin/popmail
		kill -9 ${pid}
		/sbin/ifconfig ppp0 down
		/sbin/ifconfig ppp0 delete
		/sbin/route flush
	fi
done

The connect is a 

/usr/sbin/pppd /dev/cua02 57600 connect "chat ABORT BUSY '' ATZ \
OK ATDT9431198 ogin duane assword 'blabla_bla'"

OBTW, I have been meaning to post my results of all the questions I asked 
a few weeks ago about pppd and chat and everything.  But since I haven't 
done this yet and I am posting this I would like to thank everyone that 
did help me with some of the missing links, like using the wrong tty 
ports and stuff like that.

Hope some of this is useful...

Duane...


On Thu, 23 Mar 1995, dlr wrote:

> I am trying to cludge together a script that will test for the prescence of
> ppp and if it is not up or if it is not connected to my provider (ie modem
> went down but pppd still hung) that it will kill pppd and then run my
> startup script.
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.950324124241.118A-100000>