From owner-freebsd-rc@FreeBSD.ORG Mon Jan 9 13:42:13 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06C6C106564A; Mon, 9 Jan 2012 13:42:13 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id A80978FC08; Mon, 9 Jan 2012 13:42:12 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 82939857; Mon, 9 Jan 2012 14:42:10 +0100 (CET) Date: Mon, 9 Jan 2012 14:41:02 +0100 From: Pawel Jakub Dawidek To: Doug Barton Message-ID: <20120109134101.GD4117@garage.freebsd.pl> 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> <20120109102129.GA4117@garage.freebsd.pl> <4F0AC0BF.3050709@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0/kgSOzhNoDC5T3a" Content-Disposition: inline In-Reply-To: <4F0AC0BF.3050709@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-rc@FreeBSD.org, Hiroki Sato Subject: Re: Making use of set_rcvar. X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 13:42:13 -0000 --0/kgSOzhNoDC5T3a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 09, 2012 at 02:26:07AM -0800, Doug Barton wrote: > On 01/09/2012 02:21, Pawel Jakub Dawidek wrote: > > 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, remov= es > >>> set_rcvar() entirely and assigns each rcvar statically. I'll commit t= his > >>> 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" > >> > >> Why not generally use > >> > >> rcvar=3D"${name}_enable" > >> > >> instead of (e.g.) > >> > >> rcvar=3D"nscd_enable" > >> > >> in all scripts *in your patch set*, for which the outcome is the same? > >=20 > > 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 > See my previous response. I saw your e-mail before agreeing with Stefan's proposal. And let me repeat myself: I can't see how this might be a bad idea. Do you? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --0/kgSOzhNoDC5T3a Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk8K7m0ACgkQForvXbEpPzRDiQCgww/Cmw8WnGw2+E9gv9vgGemk hxIAoOmiuXrWp3msQiuBeY0wqc7VJwn9 =fi3p -----END PGP SIGNATURE----- --0/kgSOzhNoDC5T3a--