summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin8
1 files changed, 3 insertions, 5 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 1369e3b..ec375ba 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -987,7 +987,7 @@ restore)
987 987
988 # Catch all errors that will likely create a broken backup 988 # Catch all errors that will likely create a broken backup
989 [ "${ezjail_safename}" -a "${ezjail_safename}" != "${ezjail_nameprop_safename}" ] && exerr "Error: Archive name ${ezjail_fromarchive} does not match archived jail ${ezjail_nameprop_safename}." 989 [ "${ezjail_safename}" -a "${ezjail_safename}" != "${ezjail_nameprop_safename}" ] && exerr "Error: Archive name ${ezjail_fromarchive} does not match archived jail ${ezjail_nameprop_safename}."
990 [ "${ezjail_hsname}" != "${ezjail_nameprop_hsname}" -a -z "${ezjail_forcerestore}" ] && exerr "Error: Archive was created on host named ${ezjail_hsname}. Consider using \"ezjail-admin create -a\" when migrating ezjails or -f to force restore." 990 [ "${ezjail_hsname}" != "${ezjail_nameprop_hsname}" -a -z "${ezjail_forcerestore}" ] && exerr "Error: Archive was created on host named ${ezjail_nameprop_hsname}. Consider using \"ezjail-admin create -a\" when migrating ezjails or -f to force restore."
991 [ "${ezjail_hscpu}" != "${ezjail_nameprop_hscpu}" -a -z "${ezjail_forcerestore}" ] && exerr "Error: Archive was created on a different CPU. Can not restore. Consider using \"ezjail-admin create -a\" when migrating ezjails or -f to force restore." 991 [ "${ezjail_hscpu}" != "${ezjail_nameprop_hscpu}" -a -z "${ezjail_forcerestore}" ] && exerr "Error: Archive was created on a different CPU. Can not restore. Consider using \"ezjail-admin create -a\" when migrating ezjails or -f to force restore."
992 992
993 # Save config to tempfile and source it 993 # Save config to tempfile and source it
@@ -997,10 +997,8 @@ restore)
997 fetchjailinfo ${ezjail_safename} ${ezjail_config} 997 fetchjailinfo ${ezjail_safename} ${ezjail_config}
998 998
999 # Now all parameters are here, invoke ezjail-admin create 999 # Now all parameters are here, invoke ezjail-admin create
1000 [ "${ezjail_rootdir}" -a "$ezjail_ip}" -a "${ezjail_hostname}" ] || exerr "Error: Archive does not contain a valid ezjail properties file." 1000 [ "${ezjail_rootdir}" -a "${ezjail_ip}" -a "${ezjail_hostname}" ] || exerr "Error: Archive does not contain a valid ezjail properties file."
1001 if [ "${ezjail_imagetype}" ]; then 1001 [ "${ezjail_imagetype}" ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}"
1002 ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}"
1003 fi
1004 1002
1005 $0 create -a "${ezjail_fromarchive}" -A "${ezjail_config}" ${ezjail_imagedata} -r "${ezjail_rootdir}" "${ezjail_hostname}" "${ezjail_ip}" || exerr "Error: create failed." 1003 $0 create -a "${ezjail_fromarchive}" -A "${ezjail_config}" ${ezjail_imagedata} -r "${ezjail_rootdir}" "${ezjail_hostname}" "${ezjail_ip}" || exerr "Error: create failed."
1006 rm -f "${ezjail_config}" 1004 rm -f "${ezjail_config}"