mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
rc.d/jail: add legacy compatibility for zfs.dataset
Evaluate the jail_${jailname}_zfs_dataset variable for legacy jail managers. This variable can take a space separated list of datasets. The singular was used specially to allow unmaintained jail managers like ezjail to use this (simply rename jail_${jailname}_zfs_datasets in the ezjail config to jail_${jailname}_zfs_dataset).
This commit is contained in:
parent
6caa19a08b
commit
0b49e504a3
|
@ -268,6 +268,13 @@ parse_options()
|
||||||
extract_var $_jv enforce_statfs enforce_statfs - 2
|
extract_var $_jv enforce_statfs enforce_statfs - 2
|
||||||
extract_var $_jv osreldate osreldate
|
extract_var $_jv osreldate osreldate
|
||||||
extract_var $_jv osrelease osrelease
|
extract_var $_jv osrelease osrelease
|
||||||
|
|
||||||
|
_zfs_dataset="$(eval echo \$jail_${_jv}_zfs_dataset)"
|
||||||
|
if [ -n "$_zfs_dataset" ]; then
|
||||||
|
for ds in $_zfs_dataset; do
|
||||||
|
echo " zfs.dataset += ${ds};"
|
||||||
|
done
|
||||||
|
fi
|
||||||
for _p in $_parameters; do
|
for _p in $_parameters; do
|
||||||
echo " ${_p%\;};"
|
echo " ${_p%\;};"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue