From owner-freebsd-current@FreeBSD.ORG Mon Jul 30 20:20:24 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 7DE6C16A419; Mon, 30 Jul 2007 20:20:24 +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 42C0713C46C; Mon, 30 Jul 2007 20:20:24 +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 710B82733; Mon, 30 Jul 2007 22:20:23 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp5-g19.free.fr (Postfix) with ESMTP id 1C3AB44678; Mon, 30 Jul 2007 22:20:23 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 44CD69B497; Mon, 30 Jul 2007 20:21:17 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 277D4405B; Mon, 30 Jul 2007 22:21:17 +0200 (CEST) Date: Mon, 30 Jul 2007 22:21:17 +0200 From: Jeremie Le Hen To: John Baldwin Message-ID: <20070730202117.GB11947@obiwan.tataz.chchile.org> References: <20070617225824.GA88370@obiwan.tataz.chchile.org> <200707160917.51941.jhb@freebsd.org> <20070730201604.GA11947@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: <20070730201604.GA11947@obiwan.tataz.chchile.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:20:24 -0000 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jul 30, 2007 at 10:16:04PM +0200, Jeremie Le Hen wrote: > Sorry for the late reply. I've slightly modified etc/rc.d/jail to > handle etc/jail/. And well, yes, the patch :). -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > --pf9I7BMVVzbSWLtt Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="etc_jail.diff" Index: jail =================================================================== RCS file: /mnt/octobre/space/freebsd-cvs/src/etc/rc.d/jail,v retrieving revision 1.37 diff -u -p -r1.37 jail --- jail 24 May 2007 06:01:06 -0000 1.37 +++ jail 29 Jul 2007 22:50:28 -0000 @@ -27,6 +27,13 @@ init_variables() return fi + if [ -f "/etc/jail/$_j" ]; then + eval `awk -v j="$_j" \ + '/^[[:blank:]]*[a-zA-Z_][a-zA-Z0-9_]*=/ { + print sprintf("jail_%s_%s", j, $0) + }' "/etc/jail/$_j"` + fi + eval _rootdir=\"\$jail_${_j}_rootdir\" _devdir="${_rootdir}/dev" _fdescdir="${_devdir}/fd" --pf9I7BMVVzbSWLtt--