Subject: Re: startup files (was Re: Updating /etc... )
To: Simon J. Gerraty <sjg@zen.void.oz.au>
From: Incorrigible punster -- do not incorrige <greywolf@defender.VAS.viewlogic.com>
List: current-users
Date: 12/26/1995 10:37:56
#define AUTHOR "sjg@zen.void.oz.au ("Simon J. Gerraty")"
/*
* If you are not going to have run-levels (I think they are useful but
* I've lived for years without them so no big deal), then shutdown
* scripts are more useful. If you have run-levels then shutdown hooks
* can be handled that way. In any case its a trivial exercise to
*
* mv shutdown shutdown.real
* and have a shutdown that processes shutdown.d/* then execs
* shutdown.real.
If we're even going to CONSIDER this kind of thing, then the hooks really
need to be written into halt(8)/reboot(8) and shutdown(8) since you don't
want to run
netbsd# shutdown +30
and have the machine shut your databases down half an hour before the
shutdown actually happens.
Besides that, if you say 'halt' or 'reboot' because you don't want
to run 'shutdown' (I do this frequently), you don't want all the hooks
to be in shutdown.
In fact, one would argue that we *should* put the hooks into init so
that when we change state (MU->SU or MU->down), a rc.shutdown gets run.
*
* That's what I do for most boxes. Databases _need_ to be shut down.
*
* > 4) I think that people generally agree that we need a better mechanism
* > to solve the ordering problem for scripts -- you really want to be
* > able to say "start this thing after dns and nfs are up", etc.
*
* I personally don't see this as a big issue. If we did rc.d or
* whatever with say 3 digit numbers and well known blocks for important
* services (I think I saw a message from cgd on this point), then it
* would be trivial to know that if you want your install script to be
* run after a network if any is up, but before local daemons, then add a
* link to it as S400foo.
*
* Hey, use 4 digit numbers... the shell can cope.
I would respectfully request that the rc.d thing be made an option and
not a mandatory thing (and call it something else).
* Even if you think it sucks and that a better way is needed,
* /etc/rc.d/Snnn* is just so easy and effective that we could implement
* it right away and those that care can invent a magic tool to
* automagically create the content of /etc/rc.d with links to the
* correct scripts. Personally though I probably would not want some
* tool re-configuring my system for me.
A config file with normally-named scripts would be nicer, or at least
less repulsive to the trained eye. :-)
*
* --sjg
*
*/
#undef AUTHOR /* "sjg@zen.void.oz.au ("Simon J. Gerraty")" */
--*greywolf;
--
[ ] PEACE [ ] FREEDOM Pick one.