From owner-freebsd-rc@FreeBSD.ORG Wed Jun 15 03:53:06 2011 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 D3CEE106564A for ; Wed, 15 Jun 2011 03:53:06 +0000 (UTC) (envelope-from cmdlnkid@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 904BF8FC0C for ; Wed, 15 Jun 2011 03:52:50 +0000 (UTC) Received: by iwn33 with SMTP id 33so7589387iwn.13 for ; Tue, 14 Jun 2011 20:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:date:from:to:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to; bh=sDVSvQfANaN99kuDS1KjRa5+reCPWtDPQiHZa7OFP1g=; b=rakVyBAPd62ZP54DdIadWGQ4kD3BXpMsfTPyyafNx4mp+1jCrAPF9KFpr3lmeNwW3F Vv4wlzGW62dWDzlyo47ROeUaZ3CO3yfF/mSNCeMtDHTdA6ODODrGWMaldYX3P8LM19SC JYBsSM/edmjYXpP6bqsvQ6XWErcEO6SvHixmI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; b=ZYnD898lWWhrOq50ZvFT4nPj3XulLchVfR0tWo3EaqRff0Ck2B6sHA9Ze+aFV0uPZV hn8nNj87ECN6675VE3ZCnruGzsu8LrCNghm26p2VCrJAjZUua+6u1b0NMSTwUYSYzb7l 8rNuN4yWK9F2lPJ5sYUsroAe/YtXmbUTykvsY= Received: by 10.42.155.70 with SMTP id t6mr8029515icw.405.1308109969811; Tue, 14 Jun 2011 20:52:49 -0700 (PDT) Received: from DataIX.net (adsl-99-181-139-216.dsl.klmzmi.sbcglobal.net [99.181.139.216]) by mx.google.com with ESMTPS id vo3sm10018icb.22.2011.06.14.20.52.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2011 20:52:49 -0700 (PDT) Sender: The Command Line Kid Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.4/8.14.4) with ESMTP id p5F3qlLM034000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 14 Jun 2011 23:52:47 -0400 (EDT) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.4/8.14.4/Submit) id p5F3qk7M033999 for freebsd-rc@freebsd.org; Tue, 14 Jun 2011 23:52:46 -0400 (EDT) (envelope-from jhell@DataIX.net) Date: Tue, 14 Jun 2011 23:52:46 -0400 From: jhell To: freebsd-rc@freebsd.org Message-ID: <20110615035246.GB12185@DataIX.net> References: <20110615034526.GA12185@DataIX.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110615034526.GA12185@DataIX.net> Subject: Re: [PATCH] Knock out two if statements, one eval & IDCMD with builtin test. 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: Wed, 15 Jun 2011 03:53:06 -0000 This should have been without the ``false'' On Tue, Jun 14, 2011 at 11:45:26PM -0400, jhell wrote: > > After looking over Jilles patch on this same list it made ID & IDCMD > catch my eye when I seen the $(eval $IDCMD) where it was the only place > it was used throughout the whole system in which it calls another if > statement from IDCMD to check the presence of /usr/bin/id. > > This is not bad at all, don't get me wrong but this could be done from > one location to knock out the eval and two if statements with one > builtin test right from the ID variable itself and get rid of the need > for the IDCMD. > > Slight speed improvement ? maybe... cleaner yes. > > As for functionality can anyone think of a need to wait for processing > this till run_rc_command is thrown ? if so should it be escaped and > re-eval'd as $(eval \$ID) or something similiar later ? >