[PATCH] updated /etc/rc.d/jail (ZFS support, persistent jails and other features)

Miroslav Lachman 000.fbsd at quip.cz
Tue Nov 8 20:59:01 UTC 2011

Martin Matuska wrote:
> I have improved the jail etc script significantly (in addition to ZFS
> support and other improvements).
> - you can now set a jail_name="" parameter to set the name for your jail
> - the jails are still searched by "name", so you cannot manage the jail
> with the script if "name" in /etc/rc.conf changes while running.
> - the "status" subcommand now also shows the number of running
> processes, this way you can identify an empty jail
> - there are also two new subcommands - "create" and "remove", intended
> for persistent jail operation
> - if a jail is set to persistent, you can do the following sequence:
> create start stop remove.
> - non-persistent jails may also be created (won't be started) but will
> be removed on a "stop"
> http://people.freebsd.org/~mm/patches/jail/jail_etc.v2.patch
> http://people.freebsd.org/~mm/patches/jail/jail_etc.v2.nowhitespace.patch

Just a note - there were many attempts to add jail_myjail_name="myjail" 
variable to rc.conf but it was always denied with same answer:
There is no reason for it, it can be done by jail_myjail_flags=" -n myjail"

See this PR http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/150599 and 
freebsd-jail@ archive.

Maybe it will change in jail v2 land or jail config by Jamie...

Miroslav Lachman

More information about the freebsd-current mailing list