Subject: Re: HEADS UP: RCD_SCRIPTS_EXAMPLEDIR changed to share/examples/rc.d
To: Robert Elz <kre@munnari.OZ.AU>
From: Todd Vierling <>
List: tech-pkg
Date: 12/30/2004 15:56:03
On Fri, 31 Dec 2004, Robert Elz wrote:

>   | * install package (make install or pkg_add)
>   | * explicitly enable server (add a line to rc.conf (e.g. server=YES))
>   | * optionally override default settings in rc.conf (e.g. server_flags=--foo)
>   | * start server (/etc/rc.d/server start)
> You're willing (and what's more, wanting) to do all of that work, and
> you're not willing to copy a file (or set an env var / mk.conf var to cause
> the copy to happen for you) ?   That's an interesting place to draw the line.

If the scripts were changed so that the NO (i.e., don't run server) defaults
were implied, then what would be *bad* about having all the scripts in a
ready-to-go location?  The idea here is that daemons should be usable simply
by editing a config to enable them -- without having to copy things around a
fs (or remembering how to do that via an env var[*]).  Many other OS's do
the same; the concept is pretty well tried and tested.

> The two cases are not the same at all.   Stuff in the base system gets
> installed whether I want it or not

> On the other hand, if I am explicitly installing apache, or cups, or ...
> surely I want to use the thing, why else would I be installing it?

So why isn't the rc.d script put in a ready-to-go place for you, then?
Save a step and install it by default to LOCALBASE/etc.  [Provided the
ready-to-go directory is configured for use with rcorder,] just turn on the
daemon in rc.conf and it runs.  When you pkg_delete it, the rc.d script goes
away with it and it no longer runs.

I still haven't heard why the default for rc.d scripts should be not to
install them, when the rest of CONF_FILES and SUPPORT_FILES default to being
installed.  To date, it seems to me like being different solely for the sake
of being different.


[*] I should point out that even if you set PKG_RCD_SCRIPTS=YES to override
    the NO default when pkg_add'ing, that setting is not saved.  If you
    forget to set it again at pkg_delete time, you get a nice little
    orphaned rc.d script sitting around.  Confusion potential, anyone?

-- Todd Vierling <> <>