From owner-freebsd-hackers Thu Nov 19 14:51:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA02003 for freebsd-hackers-outgoing; Thu, 19 Nov 1998 14:51:26 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA01997 for ; Thu, 19 Nov 1998 14:51:22 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id XAA27325; Thu, 19 Nov 1998 23:50:21 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id XAA10879; Thu, 19 Nov 1998 23:50:20 +0100 (MET) Message-ID: <19981119235019.54220@follo.net> Date: Thu, 19 Nov 1998 23:50:19 +0100 From: Eivind Eklund To: Nik Clayton , hackers@FreeBSD.ORG Subject: Re: /etc/rc.d, and changes to /etc/rc? References: <19981115235938.22908@nothing-going-on.org> <19981117210138.03327@nothing-going-on.org> <19981118211919.10512@nothing-going-on.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <19981118211919.10512@nothing-going-on.org>; from Nik Clayton on Wed, Nov 18, 1998 at 09:19:19PM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 (. ) #RC:AFTER - Start the service this script represent after the other service #RC:BEFORE - 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