Subject: Re: HEADS UP: RCD_SCRIPTS_EXAMPLEDIR changed to share/examples/rc.d
To: Robert Elz <kre@munnari.OZ.AU>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 12/28/2004 20:11:51
On Wed, 29 Dec 2004, Robert Elz wrote:

>   | This sounds trivially easy to fix:  make the pkgsrc-supplied scripts more
>   | lenient by setting the rcvar =NO before slurping in rc.subr/rc.conf.
>
> Yes, initially I'd thought that would work too, but it turns out not to.
>
> It is possible for rc.conf to get read just once, and not once per
> script (depending upon how things are configured), in which case the
> setting in the script would override the setting in rc.conf - which is
> not exactly what is wanted.

Use the construct:

: ${foo:=NO}

This won't override an existing setting.  I use this in all kinds of shell
scripts, and I believe autoconf uses it too.

> All this really was discussed before, even I, with my pathetic memory,
> remember that.   The solution that (I believe) has been implemented was
> the outcome - the best that can reasonably be done,

No, the current situation is definitely *un*reasonable, because of...

> The automated way doesn't - you simply tell pkgsrc (in mk.conf)

...BINARY PACKAGES.  I've mentioned them a bunch of times already.  It
should not be necessary to build from source to get reasonable default
install paths, where copying rc.d scripts one-at-a-time is NOT required.

>   | We don't do that for base system rc.d
>   | scripts; why should we require that for pkgsrc?
>
> That's because for the base system it is possible to ship defaults/rc.conf
> with appropriate default values in it.   That can't be done for pkgsrc,

And again, it certainly can be done for pkgsrc.  See above.  :)

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>