Subject: Possible rc.conf / default/rc.conf enhancements...
To: None <tech-userlevel@netbsd.org>
From: Luke Mewburn <lukem@cs.rmit.edu.au>
List: tech-userlevel
Date: 09/23/2000 15:25:59
After seeing all the feedback that occurred after my change to migrate
the guts of etc/rc.conf -> etc/default/rc.conf (*), I've considered
the following enhancements to the implementation:


1. Rename /etc/default -> /etc/defaults

	This is consistent with FreeBSD, who seem to have a similar
	concept.

	It also overcomes the objections that some people had with
	the name `/etc/default' being used in SVR4 for a different
	purpose.


2. Put commented-out defaults in /etc/rc.conf

	Perry mentioned to me recently that maybe having the defaults
	still in rc.conf but commented out might be a win.

	After setting up a machine for my father-in-law, I'm thinking
	that there may be a point here.

	But, I don't want to require that developers must keep two
	files in sync, so I propose something like:
		etc/rc.conf.template	- contains what etc/rc.conf does now
		etc/defaults/rc.conf	- as it is now

	and build etc/rc.conf with something like the following
	Makefile fragment:
		cp ${SRCDIR}/rc.conf.template rc.conf
		cat <<_foo_ >> rc.conf

#
# The rest of this file has been generated from /etc/default/rc.conf
# as an example.  If you upgrade /etc/default, be sure to take into
# account any differences between the old and new /etc/default/rc.conf.
#

_foo_
		sed -e 's/^[^#]/#&/' < ${SRCDIR}/defaults/rc.conf >> rc.conf


I feel that these changes would:
	- Keep the people happy who want the info in one file.

	- Still allows us to upgrade /etc/defaults/rc.conf to setup
	  sane defaults and make upgrades easier.

	- Doesn't require developers to modify the information in
	  two locations.

	- Doesn't have a name conflict with SVR4 and has easier
	  sysadmin compatibility with FreeBSD


Thoughts?

Luke.