Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2013 21:06:35 +0200
From:      Dirk Engling <erdgeist@erdgeist.org>
To:        Jamie Gritton <jamie@FreeBSD.org>
Cc:        freebsd-jail@FreeBSD.org
Subject:   Re: jail(8) vs. rc.d/jail features - fstab, zfs, vnet
Message-ID:  <519139BB.9070907@erdgeist.org>
In-Reply-To: <516ACA12.708@FreeBSD.org>
References:  <51670567.5070602@erdgeist.org> <51674E18.4070402@FreeBSD.org> <516A3F57.6000001@erdgeist.org> <516ACA12.708@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 14.04.13 17:24, Jamie Gritton wrote:

> line, which is inelegant to say the least. What I need is a $jid to be
> set even when it isn't specified in the config, which is a little
> complicated but doable if I just get down to it.

After stabbing around in the code for a while I found that parameter
substitution happens so early that for non-jid bound jails this
parameter will not be set until much later with the create_jail call and
thus would need special handling in load_config. Code for substituting
just the $jid variable would need to be duplicated from load_config and
reapplied just in case the jid was not set.

Still I agree, it's the much nicer approach, if it works.

> Proceed away :-).

The easy things like adding a zfs dataset parameter and the postcreate
command can be found here:

http://erdgeist.org/arts/software/jail/usr.sbin.jail-postcreate.patch
http://erdgeist.org/arts/software/jail/usr.sbin.jail-zfsdataset.patch

Regards,

  erdgeist



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?519139BB.9070907>