Subject: bin/30433: rcorder needs mechanism to override keywords
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <lukem@NetBSD.org>
List: netbsd-bugs
Date: 06/05/2005 06:51:01
>Number:         30433
>Category:       bin
>Synopsis:       rcorder needs mechanism to override keywords
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 05 06:51:00 +0000 2005
>Originator:     Luke Mewburn
>Release:        NetBSD 3.0_BETA
>Organization:
TNF
>Environment:
Architecture: i386
Machine: i386
>Description:
	rcorder(8) needs a mechanism to override the "keywords"
	for a given file.

	I propose
		rcorder -o /some/dir

	For every rcfile given, read in /some/dir/`basename rcfile`
	if it exists and parse it for keywords to override
	those in rcfile.  I would only override if at least one
	keyword exists in the "override" file, and all keywords
	in rcfile would be replaced.

	For example, if /etc/rc.d/named has
		# PROVIDE: named
		# REQUIRE: SERVERS
		# BEFORE:  DAEMON
		# KEYWORD: chrootdir
	and we invoke rcorder with
		rcorder -o /etc/rc.conf.d  /etc/rc.d/*
	and /etc/rc.conf.d/named exists and has
		# PROVIDE: named
		# REQUIRE: NETWORKING
		# BEFORE:  SERVERS
	then those latter 3 keywords will be used instead of those
	in /etc/rc.d/named.  Note that this example would mean that
	rc.d/named would act as if "KEYWORD: chrootdir" is not present.

	Adding this functionality would fix the last outstanding
	reason for making the vendor-shipped /etc/rc.d scripts
	"unchangeable" by the end user, since with this feature
	they could override the keywords (and thus the ordering)
	without needing to edit the scripts.

	The addition of this feature should remove the need for PR 16061.

	PR 30432 could be solved in a manner which makes solving this
	PR much easier.


>How-To-Repeat:
	See above.

>Fix:
	.