From owner-freebsd-arch Fri Oct 19 2: 7:13 2001 Delivered-To: freebsd-arch@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id 6E7BF37B405 for ; Fri, 19 Oct 2001 02:07:10 -0700 (PDT) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Fri, 19 Oct 2001 10:06:59 +0100 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 15uVbp-0001w8-00; Fri, 19 Oct 2001 10:06:29 +0100 Date: Fri, 19 Oct 2001 10:06:29 +0100 (BST) From: Jan Grant X-X-Sender: To: Dag-Erling Smorgrav Cc: Will Andrews , arch Subject: Re: New rc.d init script roadmap In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 19 Oct 2001, Dag-Erling Smorgrav wrote: > Will Andrews writes: > > On Thu, Oct 18, 2001 at 11:38:28PM +0200, Dag-Erling Smorgrav wrote: > > > What pidfile is /etc/rc.d/ipfilter going to leave behind? Part of the > > > sequence for starting ipfilter is "ipf -E -Fa", so you defintely do > > > *not* want to run it by accident. > > Well, obviously there will be some different interpretations of > > the "start", "stop", "restart", etc. arguments. But everything > > that starts a daemon should have a corresponding pidfile. > > My point is that the service you want to start may depend on another > service that just configures something, but doesn't start a daemon > (ipfilter is an example), so you can't always just check the pidfile > to see if a service has ben started. Also, the presence of a pidfile > does not necessarily mean the process is actually running (rc.subr is > smart enough to check if the PID listed in the pidfile exists, but > that's no guarantee either). How 'bout /etc/rc.d/blah status to give you the answer? You can supply a default implementation (eg, check PID file, etc) and override this in the cases you have to. Other stuff: status, start, stop, etc. I'd like to see prebackup postbackup prerestore postrestore too. But wouldn't we all? -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk Unfortunately, I have a very good idea how fast my keys are moving. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message