summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcryx <cryx@h3q.com>2010-01-15 14:34:00 +0000
committercryx <cryx@h3q.com>2010-01-15 14:34:00 +0000
commit9b555d6e41a68fea9210f6466a154413694c60f9 (patch)
tree7569f3d8a02012ece617c60056b91e7d5e9f4104
parent366059754d48d7699c7cfbbbb51c7a284981304d (diff)
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.
-rwxr-xr-xezjail-admin4
1 files changed, 3 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin
index d3cc9c7..3ca6fe8 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -1169,7 +1169,9 @@ restore)
1169 1169
1170 # Now all parameters are here, invoke ezjail-admin create 1170 # Now all parameters are here, invoke ezjail-admin create
1171 [ "${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." 1171 [ "${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."
1172 [ "${ezjail_imagetype}" ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}" 1172 # Setup the ezjail_imagedata. Only use the imagesize if we really have one, ZFS imagejails don't necessarily have a size.
1173 [ "${ezjail_imagetype}" -a ${ezjail_nameprop_imgagesize} ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}"
1174 [ "${ezjail_imagetype}" ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}'"
1173 1175
1174 $0 create -a "${ezjail_fromarchive}" -A "${ezjail_config}" ${ezjail_imagedata} -r "${ezjail_rootdir}" "${ezjail_hostname}" "${ezjail_ips}" || exerr "Error: Create failed." 1176 $0 create -a "${ezjail_fromarchive}" -A "${ezjail_config}" ${ezjail_imagedata} -r "${ezjail_rootdir}" "${ezjail_hostname}" "${ezjail_ips}" || exerr "Error: Create failed."
1175 rm -f "${ezjail_config}" 1177 rm -f "${ezjail_config}"