From owner-freebsd-current@FreeBSD.ORG Sun Feb 23 18:17:54 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DB70E93 for ; Sun, 23 Feb 2014 18:17:54 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF6061714 for ; Sun, 23 Feb 2014 18:17:53 +0000 (UTC) Received: from [192.168.0.7] (cpc28-cmbg15-2-0-cust64.5-4.cable.virginm.net [86.27.189.65]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.5) with ESMTP id s1NIHjk9049790 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 23 Feb 2014 18:17:48 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: libinit idea From: David Chisnall In-Reply-To: <530A39BB.6070003@allanjude.com> Date: Sun, 23 Feb 2014 18:17:40 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <0DB376E3-8C7F-4F20-9DEE-4DB98C078571@FreeBSD.org> References: <62A9DF47-C938-464B-92B6-9A2A96B5A9C9@FreeBSD.org> <530A39BB.6070003@allanjude.com> To: Allan Jude X-Mailer: Apple Mail (2.1827) Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 18:17:54 -0000 On 23 Feb 2014, at 18:11, Allan Jude wrote: > sysrc solves this nicely, it is in base now, and is great for > programmatically adding, removing and changing lines in rc.conf style > files. It is also in ports for older versions of FreeBSD where it is = not > in base. The problem is, there is no such thing as an rc.conf style file. = rc.conf is just a shell script. If you only edit it with sysrc, or you = are careful to preserve the structure, then it's fine. There is = absolutely nothing stopping you, however, from writing arbitrarily = complex shell scripts inside rc.conf. Sure, it's a terrible idea to do = so, but when has that ever stopped anyone? An rc-replacement could enforce this by only accepting purely = declarative files for configuration, guaranteeing that if they were = syntactically valid they would also be machine editable, no matter what = the user does to them. David