From owner-freebsd-rc@FreeBSD.ORG Fri Jan 13 18:20:22 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 85AAB106564A; Fri, 13 Jan 2012 18:20:22 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id CCB748FC08; Fri, 13 Jan 2012 18:20:21 +0000 (UTC) Received: by ggki1 with SMTP id i1so2371259ggk.13 for ; Fri, 13 Jan 2012 10:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=dsBSGlibBokeDbJrJEhdu7jswZVIqExvCrOy7uBtgbQ=; b=QaJoTRPROyahUUamIBtOgZFZk4G74VVwTHV651B2RNGsY+FeN6AvDBiU3+EPlnkqVR 9y71BhjCY7OtRh3PZwt/PkKFS+pALen/rTRQT3AbG5abnh4YObsm7uxKHEQlSbCNJ4tQ DJKCb2quwqi5r4rVpqSHujC9/p5QsRXMBvPKk= Received: by 10.50.46.196 with SMTP id x4mr1802635igm.15.1326478821316; Fri, 13 Jan 2012 10:20:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.207.7 with HTTP; Fri, 13 Jan 2012 10:19:49 -0800 (PST) In-Reply-To: <20120113171255.GA1694@garage.freebsd.pl> References: <4F08C95F.6040808@FreeBSD.org> <20120108.081216.1547061187942402256.hrs@allbsd.org> <4F0A22D8.8090206@FreeBSD.org> <20120109.223510.1979757999064039809.hrs@allbsd.org> <4F0FFFF7.4090105@FreeBSD.org> <20120113141058.GE1662@garage.freebsd.pl> <20120113171255.GA1694@garage.freebsd.pl> From: Chris Rees Date: Fri, 13 Jan 2012 18:19:49 +0000 Message-ID: To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-rc@freebsd.org, Doug Barton 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: Fri, 13 Jan 2012 18:20:22 -0000 On 13 Jan 2012 17:14, "Pawel Jakub Dawidek" wrote: > > On Fri, Jan 13, 2012 at 04:41:32PM +0000, Chris Rees wrote: > > On 13 Jan 2012 14:12, "Pawel Jakub Dawidek" wrote: > > > Please don't. Touching so many rc.d files is PITA during mergemaster. > > > If we want to do that, let's do that once. The current consensus as I > > > see it, is that you are the only one wanting to hardcode names and th= ere > > > are many in favour of using variables. > > > > > > > Well.... hardcoding IS faster. > > Can you prove it with ministat(1)? What difference are we talking about? > I sense I'm about to get ripped a new one... Obviously dereferencing a variable has a cost.=A0 Normally, no big deal, but I'm happy to research it later. These scripts are run through a huge number of times at various stages, and any slowdown is detrimental. Also, I tend to agree with Doug on the <> issue. If we really want to reuse code like that then we need to start using m4 or something (I'm only being half facetious here). Code reuse is great, but that's not really the case here. Chris