Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jan 2012 11:21:30 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Stefan Esser <se@freebsd.org>
Cc:        Doug Barton <dougb@FreeBSD.org>, freebsd-rc@FreeBSD.org, Hiroki Sato <hrs@FreeBSD.org>
Subject:   Re: Making use of set_rcvar.
Message-ID:  <20120109102129.GA4117@garage.freebsd.pl>
In-Reply-To: <4F0AB60E.7090601@freebsd.org>
References:  <4F079A76.3030306@FreeBSD.org> <20120107112538.GC1696@garage.freebsd.pl> <4F08C95F.6040808@FreeBSD.org> <20120108.081216.1547061187942402256.hrs@allbsd.org> <4F0A22D8.8090206@FreeBSD.org> <4F0AB60E.7090601@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 09, 2012 at 10:40:30AM +0100, Stefan Esser wrote:
> Am 09.01.2012 00:12, schrieb Doug Barton:
> > Attached is a patch that does what I suggested a long time ago, removes
> > set_rcvar() entirely and assigns each rcvar statically. I'll commit this
> > in a few days if no one objects. (Note, it can't be committed yet
> > because the scripts in ports that call set_rcvar() have to be modified
> > first.)
> [...]
> > Index: rc.d/nscd
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > --- rc.d/nscd	(revision 229825)
> > +++ rc.d/nscd	(working copy)
> > @@ -19,7 +19,7 @@
> >  . /etc/rc.subr
> >
> >  name=3D"nscd"
> > -rcvar=3D`set_rcvar`
> > +rcvar=3D"nscd_enable"
>=20
> Why not generally use
>=20
> 	rcvar=3D"${name}_enable"
>=20
> instead of (e.g.)
>=20
> 	rcvar=3D"nscd_enable"
>=20
> in all scripts *in your patch set*, for which the outcome is the same?

I fully agree. There is one less thing to change after reusing a script.
I can't see how this might be a bad idea, really.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com

--n8g4imXOkfNTN/H1
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk8Kv6kACgkQForvXbEpPzTQPQCfSnhWRRriWKFaUFZA4OiOFsHZ
R/YAniGIUcT3szuviGkXAQa/qa8w02cn
=7oDI
-----END PGP SIGNATURE-----

--n8g4imXOkfNTN/H1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120109102129.GA4117>