Subject: Re: What about startup scripts??
To: Al B. Snell <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 12/30/2000 23:31:15
On Sat, 30 Dec 2000, Al B. Snell wrote:

> On Sat, 30 Dec 2000, Frederick Bruckman wrote:
> > the daemons that he want to, and it keeps rcorder from whining. An
> > alternative would be an /etc/rc.pkg.conf which gets sourced just like
> > /etc/rc.conf.
> /usr/pkg/etc/rc.conf you mean :-)

No, I really would like to see the host configuration go under /etc. I
realize there are presently configuration files in /usr/pkg/etc,
/usr/X11R6/etc, /usr/X11R6/lib/X11/xdm, /usr/X11R6/lib/X11/fs and so
on, but the trend is to move away from that. I'd be OK with activating
the /usr/pkg/etc/rc.d scripts directly, in principle, but I don't see
how it can work...

> I heavily agree that pkg stuff should stay in /usr/pkg - /usr/pkg/etc/rc.d
> and /usr/pkg/etc/rc.conf and /usr/local/... as well - but the question is
> how to integrate this with the current boot sequence. Ideally we'd be able
> to include that in the rcorder, but as somebody pointed out, /usr may not
> be mounted at that point :-(

That's a biggie! So the scripts have to go in /etc/rc.d (eventually),
and the variables have to be set in /etc/rc.conf or /etc/rc.pkg.conf.

Here's how I see it:

The package maintainer sets "HAS_RC_SCRIPT=somethingd" in the
package's "Makefile", (after creating the script, of course). [The
name of the script is the name of the daemon is the name of the
variable, but you can't necessarily infer it from the name of the
package, therefore HAS_RC_SCRIPT is set to the name of the script, and
not to "yes".] The package machinery installs the script to
/usr/${PREFIX}/etc/rc.d at install time, and adds it to the PLIST.
Also at install time, and again at pkg_add time (via "INSTALL"),
/etc/rc.{,pkg.}conf gets "somethingd=NO" if it doesn't contain
^somethingd= already, and the user is given some standard direction
(via "MESSAGE").

For ongoing maintainance, nothing is deleted automatically from
/etc/rc.{,pkg.}conf. The user could possibly be warned to do this
automatically, too. To keep /etc/rc.d/ up-to-date, all you have to do
is "cp /usr/{src,pkg,X11R6,local}/etc/rc.d/* /etc/rc.d/", after
cleaning out /etc/rc.d.