From owner-freebsd-current@FreeBSD.ORG Mon Jul 30 20:15:12 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E74EC16A50B; Mon, 30 Jul 2007 20:15:12 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by mx1.freebsd.org (Postfix) with ESMTP id 8B7AE13C459; Mon, 30 Jul 2007 20:15:12 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id 0137144B17; Mon, 30 Jul 2007 22:15:10 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp5-g19.free.fr (Postfix) with ESMTP id CEDE144A74; Mon, 30 Jul 2007 22:15:10 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id D22809B497; Mon, 30 Jul 2007 20:16:04 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id A6E4A405B; Mon, 30 Jul 2007 22:16:04 +0200 (CEST) Date: Mon, 30 Jul 2007 22:16:04 +0200 From: Jeremie Le Hen To: John Baldwin Message-ID: <20070730201604.GA11947@obiwan.tataz.chchile.org> References: <20070617225824.GA88370@obiwan.tataz.chchile.org> <200707160917.51941.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200707160917.51941.jhb@freebsd.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-current@freebsd.org Subject: Re: RFC for wider rc.conf.d/ for jails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 30 Jul 2007 20:15:13 -0000 Hi, On Mon, Jul 16, 2007 at 09:17:51AM -0400, John Baldwin wrote: > On Sunday 17 June 2007 06:58:25 pm Jeremie Le Hen wrote: > > Hi, > > > > It is only possible to use /etc/rc.conf.d/${name}, where ${name} is the > > command name in rc(8) scripts. For instance, one can use use > > /etc/rc.conf.d/named thanks to /etc/rc.d/named. However it is not > > possible to use /etc/rc.conf.d/foo because command "foo" is not provided > > by any rc.d script. > > > > I would like to extend this behaviour for /etc/rc.d/jail in order to > > be able to have one file per jail. It would require to either modify > > rc.subr or hack up etc/rc.d/jail to include some additional files. > > I am thinking about the following layout: > > > > % # cat rc.conf.d/jail > > % jail_list="mail www" > > % # cat rc.conf.d/jail.mail > > % [...] # "mail" jail configuration variables. > > % # cat rc.conf.d/jail.www > > % [...] # "www" jail configuration variables. > > Maybe instead /etc/jail/mail, etc.? I'd rather not overload /etc/rc.conf.d > since it already has a well-defined meaning. Sorry for the late reply. I've slightly modified etc/rc.d/jail to handle etc/jail/. For instance, instead of the following in rc.conf(5): % jail_example_rootdir="/usr/jail/example" % jail_example_hostname="jail.example.org" % jail_example_ip="192.168.1.123" % jail_example_exec="/bin/sh /etc/rc" % jail_example_devfs_enable="YES" % jail_example_fdescfs_enable="YES" % jail_example_procfs_enable="NO" % jail_example_devfs_ruleset="devfsrules_jail" % jail_example_mount_enable="YES" It is possible to use /etc/jail/example: % rootdir="/usr/jail/example" % hostname="jail.example.org" % ip="192.168.1.123" % exec="/bin/sh /etc/rc" % devfs_enable="YES" % fdescfs_enable="YES" % procfs_enable="NO" % devfs_ruleset="devfsrules_jail" % mount_enable="YES" I don't know where to document it though. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >