Fix restoring zfs jails, they don't necessarily have a size so the ezjail-admin create command has to be invoked without the -s option.
This commit is contained in:
parent
366059754d
commit
9b555d6e41
@ -1169,7 +1169,9 @@ restore)
|
||||
|
||||
# Now all parameters are here, invoke ezjail-admin create
|
||||
[ "${ezjail_rootdir}" -a "${ezjail_ips}" -a "${ezjail_hostname}" ] || exerr "Error: Archive does not contain a valid ezjail properties file.\n Some jails properties are missing."
|
||||
[ "${ezjail_imagetype}" ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}"
|
||||
# Setup the ezjail_imagedata. Only use the imagesize if we really have one, ZFS imagejails don't necessarily have a size.
|
||||
[ "${ezjail_imagetype}" -a ${ezjail_nameprop_imgagesize} ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}"
|
||||
[ "${ezjail_imagetype}" ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}'"
|
||||
|
||||
$0 create -a "${ezjail_fromarchive}" -A "${ezjail_config}" ${ezjail_imagedata} -r "${ezjail_rootdir}" "${ezjail_hostname}" "${ezjail_ips}" || exerr "Error: Create failed."
|
||||
rm -f "${ezjail_config}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user