From owner-freebsd-rc@FreeBSD.ORG Mon Jun 20 09:35:28 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 1B5F51065674 for ; Mon, 20 Jun 2011 09:35:28 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id D5C1B8FC08 for ; Mon, 20 Jun 2011 09:35:27 +0000 (UTC) Received: by iyb11 with SMTP id 11so1006334iyb.13 for ; Mon, 20 Jun 2011 02:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=lFSgYfmw3p3HKSKvWfgY6mIYR90sMTJBKtGXnN3EKJQ=; b=loAz4Xr3J1aKk0f5T3I1R9i1M2NqWM38lGsfBuMQ+eunboXAIIZnaxcVuX96q2mK70 UkcFPejz7RPImcdURpHLz1izSTMPp+Y8bKhlMIrFxQgx7PVKrOb3QI7zAOOwm1l9qd9k OMcrtKWRpPiV83AsfQI2P9R9DTx3duoD2k5Vw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=azl0xSzOdk9lOJSVYmSZTWanoEXDhZfhQwXV1vOcQaKXmrKJxi+aVRJ2UJqUSh/tal CgPDwo4/DcjLubVb0wQCscMP6ED7jb23aD4E8DNMcwfEWXdbhQl6uK3RWPgPrc2ulodA mAgvU+hQVk8UDQDSoQJzAHQ2BzMgMyjhSVnQw= Received: by 10.42.147.137 with SMTP id n9mr5259201icv.383.1308562527171; Mon, 20 Jun 2011 02:35:27 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.49.193 with HTTP; Mon, 20 Jun 2011 02:34:57 -0700 (PDT) In-Reply-To: <8373928E-23AF-41D1-83BA-34324C38BB02@exonetric.com> References: <8373928E-23AF-41D1-83BA-34324C38BB02@exonetric.com> From: Chris Rees Date: Mon, 20 Jun 2011 10:34:57 +0100 X-Google-Sender-Auth: H8WXl3okWPIfUI9HSXxvCNhvn_E Message-ID: To: Mark Blackman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-rc@freebsd.org Subject: Re: Status of /etc/rc.conf.d/servicename feature in rc.subr 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, 20 Jun 2011 09:35:28 -0000 On 20 June 2011 09:57, Mark Blackman wrote: > On 20 Jun 2011, at 09:20, Stefan Midjich wrote: > >> I noticed in /etc/rc.subr that the function load_rc_config sources >> /etc/rc.conf.d/${_name}. This is however undocumented, NetBSD mentions >> this feature in rc.conf(5) but FreeBSD does not. >> >> I have two questions, is this a new undocumented feature, or an old >> one being phased out? I'm hoping it's a new because I really want this >> feature. >> >> Second question, how do I use it? I've tried to track the ${_name} >> variable but I can't find anyone calling the parent function >> load_rc_config_var() where the name variable is set from its first >> argument. > > I've added a file called 'jail' there =A0and /etc/rc.d/jail will then > pick up configuration data from /etc/rc.conf.d/jail. > > I think it's quite a useful feature and would support it's > continued existence. However I wonder who else might be interested > in a better referencing method more like a perl hash or YAML files > for the configuration data. > > There's a clear nesting behaviour there built from shell variable > names that I find a little bit overextended. > > - Mark Please refer to [1] -- rc.conf.d should not be going away, but it's undocumented because its behaviour has not been finalised -- use at your own risk, and keep up with rc.subr changes! Chris [1] http://freebsd.1045724.n5.nabble.com/RFC-Change-Request-Create-usefulne= ss-in-rc-subr-etc-rc-conf-d-conf-namespace-td4380385.html