Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 1998 23:50:19 +0100
From:      Eivind Eklund <eivind@yes.no>
To:        Nik Clayton <nik@nothing-going-on.demon.co.uk>, hackers@FreeBSD.ORG
Subject:   Re: /etc/rc.d, and changes to /etc/rc?
Message-ID:  <19981119235019.54220@follo.net>
In-Reply-To: <19981118211919.10512@nothing-going-on.org>; from Nik Clayton on Wed, Nov 18, 1998 at 09:19:19PM %2B0000
References:  <19981115235938.22908@nothing-going-on.org> <19981117210138.03327@nothing-going-on.org> <19981118211919.10512@nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 18, 1998 at 09:19:19PM +0000, Nik Clayton wrote:
> On Tue, Nov 17, 1998 at 09:01:38PM +0000, Nik Clayton wrote:
> > If there are no more comments by Thursday I'll take it as tacit agreement,
> > and go ahead. I'll do sendmail first.
> 
> Well, that's certainly one way to kick off a discussion.
> 
> Attached is a quick implementation of what I've been talking about. All
> it does is provide startup scripts for inetd and an NFS server. This is 
> a minimal implementation, provided for people to kick around.

If you're going to do this, please do it properly - splitting /etc/rc,
allowing service overrides, and tracking dependencies between
different services fully (topological sort).

A re-write of /etc/rc (along with rc.network, rc.serial, and
rc.pccard) to do this is at
http://www.freebsd.org/~eivind/newrc.tar.gz

As I did it here, it will require grep, sed and tsort to move to the
root partition - this could be replaced by just sed and tsort by
abusing sed, or a single program written to do the function
sed, grep and tsort fills in my code.

The syntax for dependencies in the stuff I wrote is adding extra lines
for the dependencies to the individual config files; the format of
these are

#RC:RUNINRC
	- Run this service by sourcing into rc (. <filename>)
#RC:AFTER <servicename>
	- Start the service this script represent after the other service
#RC:BEFORE <servicename>
	- Start the service this script represent before the other service

It is possible to introduce 'virtual services' that are just used as
split-nodes - I'm not sure if this is good or bad.

The syntax for selecting scripts is that they have to be named after
the regexp [0-9]*[A-Za-z]+[0-9]*

We should probably also record which services are started somewhere -
touching a file in /var/run/services/ is one way of doing this.


The code is mostly 'proof of concept' - I've not even tested the last
changes.  I have tested that the scripts are run in correct order etc
from the basic concept.

Eivind.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



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