Subject: Re: Allowing ${name}_path to be set in "rc.conf", was Re: Keeping /etc/defaults and /etc/rc.d in-sync
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 01/04/2002 21:36:23
[ On Friday, January 4, 2002 at 17:09:52 (-0500), Andrew Brown wrote: ]
> Subject: Re: Allowing ${name}_path to be set in "rc.conf", was Re: Keeping /etc/defaults and /etc/rc.d in-sync
>
> the whole point of having a /etc/defaults directory and then a layer
> above that people can wreck is that systemic upgrades *won't* require
> a three-way merge.  i like it the way it is.  i guess we'll have to
> disagree.  :-/

Since we were talking about the /etc/rc.d/* scripts, and how to go about
better supporting upgrades in face of end-user changes to these scripts,
you simply cannot avoid a three way merge without adding so much
complexity that there's not likely any chance anyone would ever modify
the scripts in the first place.

> getting back to the original point (this was the original point,
> wasn't it?), the /etc/rc.conf.d directory really is very useful.

It's one of the aspects of this issue, though not by any means the only
one....

In the long term I think it's better to simply avoid any conflict in
the naming of /etc/rc.d/* scripts and of course the "rcvar" names used
to control them, at least between system supplied scripts and any pkgsrc
supplied scripts (no matter where the pkgrsc scripts are installed).

People will inevitably find reasons to edit the supplied scripts (those
from the system and any from pkgsrc too) and thus there's still a change
management issue to deal with during upgrades, be they done by "make
build" or by "sysinst", or whatever....

> making rc.subr use $sshd_command instead of $command seems trivial
> enough, until you start looking at all the other things people might
> like to tweak.  the next step would be to provide overrides of those
> (eg, required_files, start_precmd, and extra_commands above). 

Indeed, though of course all the variables used by an rc.d script could
easily be made to follow similar naming conventions and thus all
settings could be made configurable from either /etc/rc.conf or from a
specific /etc/rc.conf.d script as you have done.

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>