Subject: Re: Handling 3rd party rc scripts
To: Lars Kellogg-Stedman <>
From: Luke Mewburn <>
List: tech-pkg
Date: 02/06/2002 11:17:28
On Tue, Feb 05, 2002 at 05:17:14PM -0500, Lars Kellogg-Stedman wrote:
  | I wanted to summarize a recent discussion from the netbsd-users list here 
  | and see what the packaging folks thought.
  | The original question was:
  |   > I just completed an upgrade to NetBSD 1.5.2 on my sparc, and
  |   > I decided to take a better look at the /etc/rc.d stuff.
  |   > 
  |   > One thing I notice is that the scripts don't seem to chain
  |   > to /usr/pkg/etc or /usr/local/etc.
  |   > 
  |   > Is there an official way to do this?  If not, how do the
  |   > rest of you handle it?
  | The general consensus was that support for third party rc
  | scripts should be added to /etc/rc.  My original suggestion
  | was simple to add /usr/pkg/etc/rc.d to the rcorder command
  | line in /etc/rc:
  |   files=`rcorder -s nostart /etc/rc.d/* /usr/pkg/etc/rc.d/*`
  | But as Amitai Schlair pointed out, /usr may not be mounted
  | when rcorder is run.
  | What about allowing third party packages to place rc scripts
  | in something like /etc/pkg/rc.d?  This directory can be
  | added to the rcorder command line, and third party rc
  | scripts can then benefit from the same dependency resolution
  | system that the system rc scripts use.

This issue comes up fairly regularly.

My take (as the main architect and implementor of / target of flame
mail regarding) the rc.d system is that we only look in /etc/rc.d
for scripts in the default install, and nowhere else (especially not
on /usr).

However, I understand that other people have local requirements and
may want to expand upon this list, or wish to control rcorder in other

So, I'm seriously considering adding two more rc.conf variables:

	extra parameters to /etc/rc's rcorder.
	the relevant line will change from
	    files=`rcorder -s nostart /etc/rc.d/*`
	    files=`rcorder -s nostart $rc_rcorder_flags /etc/rc.d/*`

	extra parameters to /etc/rc.shutdown's rcorder.
	the relevant line will change from
	    files=`rcorder -k shutdown /etc/rc.d/*`
	    files=`rcorder -k shutdown $rc_shutdown_rcorder_flags /etc/rc.d/*`

If you want to look in other locations (e.g, /usr/local/etc/rc.d), add

Thus gaining the flexibility that you require without forcing your
requirements on other users.