From owner-freebsd-jail@FreeBSD.ORG Sat Apr 28 14:38:36 2012 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E17F2106564A for ; Sat, 28 Apr 2012 14:38:36 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from m2.gritton.org (gritton.org [199.192.164.235]) by mx1.freebsd.org (Postfix) with ESMTP id ACFCC8FC0C for ; Sat, 28 Apr 2012 14:38:36 +0000 (UTC) Received: from glorfindel.gritton.org (c-174-52-130-208.hsd1.ut.comcast.net [174.52.130.208]) (authenticated bits=0) by m2.gritton.org (8.14.4/8.14.4) with ESMTP id q3SEcQX2003314; Sat, 28 Apr 2012 08:38:26 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <4F9C00E2.3070205@FreeBSD.org> Date: Sat, 28 Apr 2012 08:38:26 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.24) Gecko/20120129 Thunderbird/3.1.16 MIME-Version: 1.0 To: Dirk Engling References: <4F99AB0E.4090805@FreeBSD.org> <4F9B6E8F.8070708@erdgeist.org> In-Reply-To: <4F9B6E8F.8070708@erdgeist.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD-Jail Subject: Re: New jail(8) committed X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 14:38:37 -0000 The main reason I didn't consider a jail.d approach is just that I haven't - such things are a little off the radar for me. It seemed very natural to use a configuration file format that other programs already use (e.g. named, apmd, devd). I suppose it's true that the "foo.d" approach is also in use by other programs, though I mostly seem to see those on Linux. And if I did opt for a directory approach, the files within the directory would still need a format - you can't get away from the fact that a config file needs a format. It would be nice to have a general parser for C-style config files, and I looked for such a library when I started on this. But such a library doesn't seem to exist.Perhaps it's time to make one. - Jamie On 04/27/12 22:14, Dirk Engling wrote: > On 26.04.12 22:07, Jamie Gritton wrote: > >> I've finally put my jail(8) changes into HEAD. This new version of jail >> can create jails from a configuration file - see jail.conf(5) for the >> format, as well as some additions to jail(8). This doesn't mean you >> *have* to use jail.conf, but it's a better way to manage jails than the >> existing rc.conf method. > > Out of curiosity, why did you settle for a /etc/jail.conf instead of a > /etc/jail.d/? Your config file format introduces the dependency into an > expensive parser while adding little value. Even worse, the user now has > to struggle with just another format describing the system. > > I can foresee that my automated jail management tool ezjail will not be > able to support the jail.conf format due to the lack of a parser. A look > into ezjails config directory structure can give you a hint of how to > achieve some similar clean up with built in tools. > > I am not saying, the config directory format is perfect, the current > redundancy in jail_JAILNAME variables is a mess, but inventing a > container format where files would do just fine in my opinion is overkill. > > Regards, > > erdgeist