Subject: Re: Updating /etc... (fwd)
To: None <current-users@NetBSD.ORG>
From: Matt Ragan <matt@ibmoto.com>
List: current-users
Date: 12/21/1995 10:42:09
Evidently, this one got dropped somewhere yesterday, since I never saw it
again after it went out. Here's one more try...
Matt Ragan (matt@ibmoto.com) wrote:
>From matt Wed Dec 20 10:50:31 1995
>Subject: Re: Updating /etc...
>To: rhealey@altair.helios.mn.org (Rob Healey)
>Date: Wed, 20 Dec 1995 10:50:31 -0600 (CST)
>Cc: ghudson@mit.edu, current-users@NetBSD.ORG
>In-Reply-To: <199512191548.JAA08712@altair.helios.mn.org> from "Rob Healey" at Dec 19, 95 09:48:50 am
>X-Mailer: ELM [version 2.4 PL23]
>MIME-Version: 1.0
>Content-Type: text/plain; charset=US-ASCII
>Content-Transfer-Encoding: 7bit
>Content-Length: 3424
>
>Rob Healey wrote:
>>
>>> It evades me why people in the System V world decided that each
>>> package should have its own startup/shutdown script in /etc. Why does
>>> all that hair belong in /etc, instead of in the executables for the
>>> packages themselves?
>>>
>> Have you worked at a large UNIX site? There is a reason why LARGE
>> sites like /etc/init.d, it's not just dumb luck. In a nutshell:
>
>I work at a 'large UNIX site', and personally, I don't like the /etc/init.d
>(or others' /etc/rc.d). However, as much bashing as AIX deserves in general,
>something akin to AIX's inittab might not be a Bad Thing(tm).
>
>Note that the following is not AIX's implementation, but is somewhat
>loosely based on it:
>
>In /etc, you would have a file that would have the following format:
>
>package name:start command
>
>The 'package name' is simply a label, and the 'start command' should be
>fairly obvious. In /etc/rc or /etc/rc.local, you would have a place to
>go through the file starting each of your packages, either with a shell
>function or an external command, depending on implementation. An
>external command would probably be more useful, since then you could
>manually start something after this system is up with the same way it
>would be done in the rc files.
>
>If you wanted to get fancy and more configurable, you could extend it
>to something like:
>
>package name:subsystem:start command:shutdown command
>
>In this case, you can call the startup command multiple times throughout
>your rc files to start things in different places, if you need to. For
>example, start the 'net' subsystem in one place, and then later start
>the 'nfs' subsystem. The subsystem would be optional, so that at
>the end of /etc/rc, you would call the startup command to start the
>remaining packages that do not have a subsystem. The start command
>should also be able to take a package name, rather than a subsystem
>name, to be able to start a specific package; this would be more
>useful for starting things manually while in multiuser.
>
>The shutdown command could be used within /sbin/shutdown (or, more
>likely, a frontend shell script) to do special shutdowns for the
>packages that need them, for example, a database. It would be an
>optional field, since not everything needs special shutdowns.
>
>This gives you a number of things:
>
>a) it's a file, not a directory, so you don't have a directory structure
> underneath /etc.
>
>b) you can order your packages within each subsystem to have them start
> up in the order you want them to, which is much more difficult to do
> in the 'file in a directory' concept that init.d uses; you end up with
> lovely file names like S88nfs.
>
>c) install packages can insert the appropriate startup line into the
> file easily to get automatically run on startup/shutdown, and removal
> packages can easily remove them by keying off of the package name in
> the file
>
>d) it's optional. If you don't want to use it, put your stuff in /etc/rc
> or /etc/rc.local as you did previously, and it will work the same as
> it did before.
>
>--
>--------------------------------------------------------------------------
>Matt Ragan (matt@ibmoto.com) Motorola/IBM Somerset PowerPC Design Center
>Network Administrator Systems/Network Engineering (512) 795-7298
>9737 Great Hills Trail Austin, Tx 78759 FAX (512) 795-7519
>--------------------------------------------------------------------------
>
--
--------------------------------------------------------------------------
Matt Ragan (matt@ibmoto.com) Motorola/IBM Somerset PowerPC Design Center
Network Administrator Systems/Network Engineering (512) 795-7298
9737 Great Hills Trail Austin, Tx 78759 FAX (512) 795-7519
--------------------------------------------------------------------------