Subject: Re: Updating /etc...
To: Michael Graff <explorer@flame.org>
From: Todd Kover <kovert@umiacs.UMD.EDU>
List: current-users
Date: 12/19/1995 13:49:03
 > >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?
 > 
 > Because startup scripts CAN be modified on a per-machine basis.  I do
 > that on occasion.
 > 
 > I propose the following:
 > 
 > /etc/config/pkg/{start,config,setup,setup.tk}
 > 
 > where pkg is the name of the package,
 > start will kick the package to get it going,
 > config is a sample config file for it,
 > setup is a shell script to make a config file,
 > setup.tk is a tk stub for a GUI-ish setup system.

That's a bit overly complex, IMHO, and I'd imagine that it'd a pretty
decent setup for the standard distribution, but as soon as outside
stuff gets added to a system, you'll end up with most of those things
just not being there, so any tools that were built up on the idea would
be only half useful since most of the added on things wouldn't have
config/setup.tk/setup, etc.

I like some sort of hack on the OSF (err, Digital Unix) method of doing
it (some variation of this is stuff we hacked in locally, and I can
never keep track of which is which :), but...

have /etc/rc source in /etc/rc.config (or something) that goes through
and sets up environment variables describing the configuration, then
have it iterate through scripts in /sbin/startupscripts/*m, letting the
scripts decide if they should run or not based on the environment
variables set.  Have some similar process for shutdown with
/sbin/shutdownscripts that get called if you use shutdown to shutdown
the machine.

This sort of thing would work nice in our environment where we have a
lot of clients that are basically kept generic looking, and have much
of thier root filesystems kept in sync with a specific machine
by-way-of rdist.  You can rdist the startup/shutdown scripts to make a
change on all machines with relative ease, (if you upgrade some binary
along the way that now starts up differently, rather than having to go
touch up each rc.local -- for hundreds of machines this can get
painful.  :)  It also makes it easier to restart something by doing
/sbin/shutdownscripts/sendmail;/sbin/startupscripts/sendmail (or even
better rshing this out to a bunch of machines to switch over to a new
version of sendmail in a for loop).

my two cents, anyway..
-Todd

--
Todd Kover                 //  --o-- If, after having been exposed to someone's
kovert@umiacs.umd.edu    \X/         presence, you feel as though you've lost
http://www.umiacs.umd.edu/~kovert    a quart of plasma, avoid that presence.
		     "Beware the fury of a patient man."