From owner-freebsd-jail@FreeBSD.ORG Sun Mar 31 18:31:21 2013 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AC07E1D2 for ; Sun, 31 Mar 2013 18:31:21 +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 8C1E699A for ; Sun, 31 Mar 2013 18:31:20 +0000 (UTC) Received: from glorfindel.gritton.org (c-174-52-130-157.hsd1.ut.comcast.net [174.52.130.157]) (authenticated bits=0) by m2.gritton.org (8.14.5/8.14.5) with ESMTP id r2VIVHxN062001; Sun, 31 Mar 2013 12:31:18 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <515880F3.1050300@FreeBSD.org> Date: Sun, 31 Mar 2013 12:31:15 -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: Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: rc.d/jail and jail.conf References: <515721F8.9090202@erdgeist.org> <515847AF.8070808@FreeBSD.org> <5158526A.4020400@quip.cz> <51586419.5090207@FreeBSD.org> <51586DC8.7030500@quip.cz> In-Reply-To: <51586DC8.7030500@quip.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-jail@FreeBSD.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Mar 2013 18:31:21 -0000 On 03/31/13 11:09, Miroslav Lachman wrote: > Jamie Gritton wrote: >> On 03/31/13 09:12, Miroslav Lachman wrote: >> >>> Is there a way to disable jail defined in jail.conf? (to avoid >>> jail2_list in rc.conf) >> >> I'm not sure what you're asking. You want a jail in jail.conf that's not >> started up? > > Yes, I am asking if there can be some variable or parametr in jail.conf > for jail which we don't want to start by jail command, but leave its > configuration in jail.conf. > I am not saying I need it right now, but I can imagine a scenario where > it can be useful. > > In the old style with rc.conf, we can have defined for example 5 jails > (jailA to jailE) and then enabled only some of them to start at boot > time by defining jail_list="jailA jailB jailC". > > With syntax of new jail.conf one must delete or comment out the whole > jailD and jailE definitions to stop loading them at boot time. > Am I right? There is a way, though not in the jail.conf file itself. When you run "jail -c" it will start all of the jails in the file. But if you list one or more jails on the command line, e.g. "jail -c jailA jailB", then it will only start those jails. > So is it possible to add some keyword to jail.conf jails definition? > Something like "disabled" or "noautostart" or anything else... > > foo { > disabled; > host.hostname = "foo.com"; > ip4.addr = 10.1.1.1, 10.1.1.2, 10.1.1.3; > } > > Then one can easily disable jail "foo" without a need to remove its > configuration. That seems reasonable, but using a jail list in rc.conf may suffice. - Jamie