Subject: Re: defaulting rc.d scripts to share/examples/rc.d
To: Johnny C. Lam <jlam@netbsd.org>
From: grant beattie <grant@netbsd.org>
List: tech-pkg
Date: 09/24/2004 14:47:28
--xgyAXRrhYN0wYx8y
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Sep 24, 2004 at 04:26:46AM +0000, Johnny C. Lam wrote:
> > this implies that the supplied rc.d scripts are "examples", which is
> > not entirely true.
>=20
> I disagree. The PKGINSTALL framework treats rc.d scripts exactly like
> config files; it assumes that the rc.d scripts in ${RCD_SCRIPTS_DIR}
> can be modified by the user after installation, so the ones supplied
> by the package at the well-known location /usr/pkg/etc/rc.d really
> are examples.
I suppose, given that definition, it makes sense, but the "real" rc.d
scripts are fine to use without modification...
> > imho you shouldn't have to. you should just be able to tweak a knob
> > and have things Just Work, using all of the rc.d scripts of currently
> > installed pkgs.
>=20
> I don't think this is a good idea. We don't give package maintainers
> any guidelines for how to write rc.d scripts, and as a consequence,
> they vary quite a bit in quality. Since the last thing you want is
> for a machine that boots to automatically start processes that you
> didn't yet configure, I don't think this idea is ready for the real
> world.
er, you'd still need to actually *do* something to make this happen,
and blah=3DYES in /etc/rc.conf. all I'm talking about it making it
easier for users to do this, not mandating it, or making it silently
do things that you don't want.
perhaps all we need to do to fix this "problem" is to write a template
mandate that all pkgsrc packages that supply rc.d scripts conform to
our standard.
> > that should be relatively simple to fix (and is related to having
> > things Just Work), but is a separate issue to the location of the
> > examples dir.
>=20
> PKG_RCD_SCRIPTS=3DYES does exactly this, and I've had it in my /etc/mk.co=
nf
> since ~forever, but this does leave me open to the problem I note
> above, which *has* bitten me several times. That's exactly why it
> defaults to "NO".
it only bites you *if* you use RCD_SCRIPTS_DIR=3D/etc/rc.d - other
directories aren't looked at by the default /etc/rc stuff on NetBSD.
> FWIW, I think the change to use share/examples/rc.d is a good idea.
> In general, the files in /usr/pkg/etc are all config files, and we
> really shouldn't install stuff there that we don't want to be modified.
agreed. :)
grant.
--xgyAXRrhYN0wYx8y
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iD8DBQFBU6bgluYOb9yiFXoRAjNfAJ9NESE2cvnXvxUKmaAchjsEJgIUmQCggw8V
yrm6V02VuvVTEsYt0VpBk+8=
=Ra3F
-----END PGP SIGNATURE-----
--xgyAXRrhYN0wYx8y--