Subject: Re: /usr/pkg/etc/rc.d/*
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 03/17/2003 10:45:54
Thus spake Chuck Yerkes ("CY> ") sometime Today...
(MGS == Michael G. Schabert; GW == Greg Woods)

MGS> > > 1) anything in /usr/pkg/etc/rc.d/ should be copied to /etc/rc.d/

GW> > And that's it in a nutshell...  ;-)

Not.  At least not for everybody, although I'm doing it this way as well.
I'm thinking of improving this process, though...

CY> Oh good.  There's nothing I want less than to mix system-shipped
CY> stuff indiscrimately with package and local startup scripts.
CY>
CY> We might as well install pkgs into /usr/bin/ and /usr/sbin/.

[I'm sure Greg'd love that one.]

CY> The "right answer" might simply be to have /etc/rc.local.d/ (or
CY> whatever name you like) and change the rcorder call to  include
CY> that as well:
CY>
CY> Was:
CY>  files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*)
CY>
CY> Could be:
CY>  files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/* /etc/rc.local.d/*)
CY>
CY> (see also /etc/rc.shutdown)

Typically, we reference ${PKGBASE}/etc/rc.d/* for this; this is quite
consistent with maintaining ${PKGBASE} as a separate but similar hierarchy
to /, which is something I happen to personally favour, but that's my
problem.

In order to keep it consistent, we'd probably also want to have
${PKGBASE}/etc/rc.conf and have an /etc/rc.d/local run sometime after
mountall is done.

/etc/rc.d/local would, first thing:

	. ${PKGBASE:-/usr/pkg}/etc/rc.conf

How it proceeds after that is left as an exercise to those who "know
best how to proceed".

				--*greywolf;
--
NetBSD: Don't login as root; use 'su'.