Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2001 10:06:29 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Will Andrews <will@physics.purdue.edu>, arch <arch@FreeBSD.org>
Subject:   Re: New rc.d init script roadmap
Message-ID:  <Pine.GSO.4.31.0110191004160.11492-100000@mail.ilrt.bris.ac.uk>
In-Reply-To: <xzpvghc8unk.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19 Oct 2001, Dag-Erling Smorgrav wrote:

> Will Andrews <will@physics.purdue.edu> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.31.0110191004160.11492-100000>