Subject: Re: Allowing ${name}_path to be set in "rc.conf", was Re: Keeping /etc/defaults and /etc/rc.d in-sync
To: None <>
From: Greg A. Woods <>
List: tech-userlevel
Date: 12/29/2001 11:21:41
[ On Saturday, December 29, 2001 at 22:02:15 (+0700), Robert Elz wrote: ]
> Subject: Re: Allowing ${name}_path to be set in "rc.conf", was Re: Keeping /etc/defaults and /etc/rc.d in-sync 
> But that's not the only reason why one might want to customise rc.d
> scripts - perhaps a bigger reason is that there's currently no way at
> all to affect the magic comments.
> Eg: if you're running swap on raidframe, you need to add
> 	# KEYWORD: shutdown
> to rc.d/swap1 so raid gets a chance to clean up the device and mark the
> parity as clean - otherwise parity has to be rebuilt after every reboot.

That's something which should be there always anyway.  The extra amount
of time it takes to always cleanly remove all the active swap devices is
insignificant when you take into account to the number of times one does
a proper shutdown.  (That said I must admit I have a 4MB machine that
_sometimes_ cannot successfully 'swapctl -U', not even during shutdown
or in single user mode, though that may be a problem with some tuning of
UVM in my 1.5T kernel.)

> There's no way to come even close to do that currently.   Similarly, if
> you need to change the order of the scripts for some reason, you need
> to adjust the PROVIDES and REQUIRES (sometimes BEFORE) magic comments.

That's a pretty big 'iff'....

There are some classic cases, of course, but so far as I can tell
they're all representative of design flaws which should be fixed in the

> Until there's some way to adjust those, we shouldn't be just blindly
> overwriting rc.d/*
> But, of course it is OK to overwrite anything that hasn't been altered
> (which will be 99% of the rc.d/* files actually existing I suspect).

And how do you suggest the build do that without storing original copies
somewhere they won't be edited (eg. /etc/defaults/rc.d/*) so they can be
compared with the active copies in /etc/rc.d?  I wouldn't mind such a
scheme myself, but I wouldn't want to guess as to how acceptable others
might find it.

								Greg A. Woods

+1 416 218-0098;  <>;  <>;  <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>