From owner-freebsd-rc@FreeBSD.ORG Mon Jan 9 10:26:09 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 7C427106564A; Mon, 9 Jan 2012 10:26:09 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D7C3E1550B3; Mon, 9 Jan 2012 10:26:07 +0000 (UTC) Message-ID: <4F0AC0BF.3050709@FreeBSD.org> Date: Mon, 09 Jan 2012 02:26:07 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Pawel Jakub Dawidek 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> In-Reply-To: <20120109102129.GA4117@garage.freebsd.pl> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 10:26:09 -0000 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, 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 >>> =================================================================== >>> --- rc.d/nscd (revision 229825) >>> +++ rc.d/nscd (working copy) >>> @@ -19,7 +19,7 @@ >>> . /etc/rc.subr >>> >>> name="nscd" >>> -rcvar=`set_rcvar` >>> +rcvar="nscd_enable" >> >> Why not generally use >> >> rcvar="${name}_enable" >> >> instead of (e.g.) >> >> rcvar="nscd_enable" >> >> 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. See my previous response. If you still need help with that "search and replace" thing I can walk you through it in vi. If you're an emacs user, you're on your own though, sorry. :) Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/