From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 7 12:37:46 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8DE0106564A for ; Thu, 7 Oct 2010 12:37:46 +0000 (UTC) (envelope-from rand@meridian-enviro.com) Received: from zimbra.meridian-enviro.com (zimbra.meridian-enviro.com [12.192.92.32]) by mx1.freebsd.org (Postfix) with ESMTP id A7E1E8FC0A for ; Thu, 7 Oct 2010 12:37:46 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.meridian-enviro.com (Postfix) with ESMTP id 8587630701C9 for ; Thu, 7 Oct 2010 07:19:41 -0500 (CDT) X-Virus-Scanned: amavisd-new at meridian-enviro.com Received: from zimbra.meridian-enviro.com ([127.0.0.1]) by localhost (zimbra.meridian-enviro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RrZD3excC78K for ; Thu, 7 Oct 2010 07:19:41 -0500 (CDT) Received: from delta.meridian-enviro.com (delta.meridian-enviro.com [10.10.10.43]) by zimbra.meridian-enviro.com (Postfix) with ESMTP id 1179030701C7 for ; Thu, 7 Oct 2010 07:19:41 -0500 (CDT) Date: Thu, 07 Oct 2010 07:19:41 -0500 Message-ID: <87fwwici02.wl%rand@meridian-enviro.com> To: freebsd-hackers@freebsd.org X-Draft-From: ("nnml+rand:freebsd.hackers" 67823) References: <1286397912.27308.40.camel@localhost.localdomain> <51B4504F-5AA4-47C5-BF23-FA51DE5BC8C8@vicor.com> <4CAD513F.3010903@DataIX.net> <4CAD7563.1070706@DataIX.net> From: Douglas K. Rand User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i386-portbld-freebsd8.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2010 12:37:46 -0000 I think that this script might also fill a void with using Puppet as a configuration tool. Currently Puppet, as its default behaviour, uses files in /etc/rc.conf.d to set variables. I've found this approach really lacking because you cannot do things like: nfs_server_enable="YES" via a /etc/rc.conf.d file because multiple things (like lockd, mountd, nfsd, nfsserver, and statd) all need nfs_server_enable set, as one example. This script would provide an easy method for puppet to "edit" lines in /etc/rc.conf. I have a feature request though: How about a switch like "-c config-file" to change which file sysrc_set adds the line to. We use both /etc/rc.conf and /etc/rc.conf.local on some systems, and it would be nice to be able to specify that this particular knob should be placed in /etc/rc.conf.local. I'm unsure what should happen if -c is specified and the knob you want to change already exists in another rc.conf file: Should it be moved to the new location, or changed where it is? (Maybe that'd be yet another option to sysrc.)