From owner-freebsd-questions Fri Mar 24 12:50:09 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA20075 for questions-outgoing; Fri, 24 Mar 1995 12:50:09 -0800 Received: from saber.ptw.com (c2.ptw.com [204.178.60.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id MAA20059 for ; Fri, 24 Mar 1995 12:49:47 -0800 Received: (from duane@localhost) by saber.ptw.com (8.6.9/8.6.9) id MAA00139; Fri, 24 Mar 1995 12:48:04 -0800 Date: Fri, 24 Mar 1995 12:48:02 -0800 (PST) From: Duane Ellison X-Sender: duane@saber.ptw.com To: dlr cc: questions@FreeBSD.org Subject: Re: ping under freebsd In-Reply-To: <199503232141.NAA05443@netcom.netcom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: questions-owner@FreeBSD.org Precedence: bulk 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. >