[99798] 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 (Dictator For Life)
Tue Nov 17 01:34:06 1998

From: Dictator For Life <criterion-consulting@usinternet.com>
To: redhat-list@redhat.com
Date: Tue, 17 Nov 1998 00:29:15 -0600
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

On Mon, 16 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.


If you use ppp, there should be a lock file created by pppd (somewhere in the
/var tree? I forget). If there isn't, you can make it create one by adding an
entry to the /etc/ppp/options file. If I remember correctly, just add a line
that says "lock". Have your cron job look for this file.

HTH,

DFL


-- 
  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