[100005] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: Check for ppp connexion in script

daemon@ATHENA.MIT.EDU (Fred Smith)
Wed Nov 18 03:05:49 1998

Date: Tue, 17 Nov 1998 23:06:26 -0500
From: Fred Smith <fredex@fcshome.stoneham.ma.us>
To: Red Hat Users List <redhat-list@redhat.com>
Mail-Followup-To: Red Hat Users List <redhat-list@redhat.com>
In-Reply-To: <Pine.LNX.3.95.981117194610.31853A-100000@localhost>; from Rick L. Mantooth on Tue, Nov 17, 1998 at 07:51:05PM -0600
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

On Tue, Nov 17, 1998 at 07:51:05PM -0600, Rick L. Mantooth wrote:
> Zoki,
> Here is the begining of my checkmail script:

And another way to do it is to grep for:

	Point-Point Protocol

in the output of ifconfig, something like:

	grout=`ifconfig | grep "Point-Point Protocol"`
	if [ grout ]	# found it!
		then
		# do your stuff here
	fi

but note that's off the top of my head.

I've got a script I run from cron which starts ppp, waits for it to come
up then fires up some program to make use of it. I can show it to you if
you want. Let me know by private e-mail if you want to see it.

Fred
> On Tue, 17 Nov 1998, Zoki wrote:
> 
> > Since I've scripts as cronjobs to take care of mail I 'm having the
> > annoying experience that the scripts try to make a connection even if I'm
> > allready on line. What I would like to do is make the script check if
> > there is a connection and if so skip the dialing and go straight to
> > downloading and sending mail. I checked in the archives but couldn't find
> > the answer to this question. I've an idea I should work with grep but
> > since I never used it, I don't know its "grammar".
> > 
> > Thanks,
> > Zoki.
> > _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
> > ZOKImage Paris
> > 	Creation d'images est traitement numerique
> > 			Image creation & digital tweaking
> > _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
> > 
> > Mailed with Linux and Pine.
> > 
> 
> --
> Rick L. Mantooth	rickdman@cyberramp.net
> http://www.cyberramp.net/~rickdman
> We have enough youth, how about a fountain of "Smart."
> 
> 
> -- 
>   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> 		http://www.redhat.com http://archive.redhat.com
>          To unsubscribe: mail redhat-list-request@redhat.com with 
>                        "unsubscribe" as the Subject.

-- 
-------------------------------------------------------------------------------
 .----    Fred Smith    /                                                      
( /__  ,__.   __   __ /  __   : /                                              
 /    /  /   /__) /  /  /__) .+'           Home: fredex@fcshome.stoneham.ma.us 
/    /  (__ (___ (__(_ (___ / :__                                 781-438-5471 
-------------------------------- Jude 1:24,25 ---------------------------------


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post