From owner-freebsd-questions Fri Jun 14 07:23:27 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA17801 for questions-outgoing; Fri, 14 Jun 1996 07:23:27 -0700 (PDT) Received: from ylana.vet.purdue.edu (vet.vet.purdue.edu [128.210.79.50]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA17796 for ; Fri, 14 Jun 1996 07:23:22 -0700 (PDT) Received: from ylana.vet.purdue.edu (localhost.vet.purdue.edu [127.0.0.1]) by ylana.vet.purdue.edu (8.7.5/8.7.3) with ESMTP id JAA24279; Fri, 14 Jun 1996 09:23:56 -0500 (EST) Message-Id: <199606141423.JAA24279@ylana.vet.purdue.edu> X-Mailer: exmh version 1.6.7 5/3/96 To: Carey Nairn cc: FreeBSD Questions Subject: Re: User PPP question In-reply-to: Your message of "Fri, 14 Jun 1996 11:34:48 +1000." Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk From: Benjamin Lewis Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 14 Jun 1996 09:23:55 -0500 Sender: blewis@vet.purdue.edu Carey Nairn wrote: > The situation is that I run ppp -auto and download mail twice a day out > of cron. The PPP connection is also used intermittently for other things > (WWW browsing etc.) and I would just like to periodically check to see if > I am connected and download mail if I am. I have a little tcl thingy that does this. The easiest way to check whether the connection is up is to check whether the lockfile exists. I check whether /var/spool/lock/LCK..cuaa3 exists in my case. Of course, this relies on the fact that PPP is the only thing that uses that device on my system and that PPP is pretty good at releasing the lock even if it dies oddly. -Ben -- Benjamin Lewis - blewis@vet.purdue.edu