Subject: Re: HEADS UP: RCD_SCRIPTS_EXAMPLEDIR changed to share/examples/rc.d
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <woods@planix.com>
List: tech-pkg
Date: 12/29/2004 20:21:56
[ On Monday, December 27, 2004 at 21:13:47 (-0800), Jeremy C. Reed wrote: ]
> Subject: Re: HEADS UP: RCD_SCRIPTS_EXAMPLEDIR changed to share/examples/rc.d
>
> jlam then modified it in December 2001 (1.12) to "Default to not
> installing the rc.d scripts automatically.". The CVS log says:  By
> default, don't install the rc.d scripts into /etc/rc.d.  Despite the fact
> that they don't do anything unless the appropriate variables are set in
> rc.conf, people really dislike the warning emitted at startup.


BTW, my colleague Andreas Wrede suggested to me a very simple fix to
this problem of these unnecessary "WARNING: $blah is not set properly in
/etc/rc.conf - see rc.conf(5)." messages.

The fix would be to create, as another managed configuration file, an
/etc/defaults/rc.blah file with the "blah=NO blah_flags=''" values in
it; and then of course to have rc.subr source this new file in between
sourcing /etc/defaults/rc.conf and /etc/rc.conf.  As a managed config
file it would be removed, if still unchanged, when the pkg is deleted.

(alternately put it in a new directory /etc/defaults/rc.conf.d/blah)

(actually his original suggestion was to create a new
/etc/rc.conf.d/blah file if it didn't already exist and insert those
values, but of cource that file is sourced _after_ /etc/rc.conf and so
it would not have the right effect unless the right shell magic was used
to only set the variable if it's not already set)

-- 
						Greg A. Woods
						Planix, Inc.

<woods@planix.com>     +1 416 489-5852 x122     http://www.planix.com/