Subject: Re: Possible rc.conf / default/rc.conf enhancements...
To: Luke Mewburn <lukem@cs.rmit.edu.au>
From: Jaromír Dolecek <dolecek@ibis.cz>
List: tech-userlevel
Date: 09/24/2000 18:04:53
I think that /etc/rc.conf should not source /etc/default[s]/rc.conf.
I think it would be usable to have /etc/defaults/rc.conf, but
/etc/rc.conf should be the main configuration file. /etc/defaults/rc.conf
should only be used when upgrading, to see what changed in
default config since last /etc/ upgrade.

So, both /etc/rc.conf and /etc/defaults/rc.conf should exist. Installer
should copy /etc/defaults/rc.conf to /etc/rc.conf is /etc/rc.conf
doesn't exist already.

Jaromir

Luke Mewburn wrote:
> 
> 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.
> 
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@