From 78416d679d2cfa81f70cbbf41264ef80311ed6e8 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 9 Jul 2008 22:03:29 +0000 Subject: A control character slipped into the script --- ezjail-admin | 8 +++----- 1 file 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) # Catch all errors that will likely create a broken backup [ "${ezjail_safename}" -a "${ezjail_safename}" != "${ezjail_nameprop_safename}" ] && exerr "Error: Archive name ${ezjail_fromarchive} does not match archived jail ${ezjail_nameprop_safename}." - [ "${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." + [ "${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." [ "${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." # Save config to tempfile and source it @@ -997,10 +997,8 @@ restore) fetchjailinfo ${ezjail_safename} ${ezjail_config} # Now all parameters are here, invoke ezjail-admin create - [ "${ezjail_rootdir}" -a "$ezjail_ip}" -a "${ezjail_hostname}" ] || exerr "Error: Archive does not contain a valid ezjail properties file." - if [ "${ezjail_imagetype}" ]; then - ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}" - fi + [ "${ezjail_rootdir}" -a "${ezjail_ip}" -a "${ezjail_hostname}" ] || exerr "Error: Archive does not contain a valid ezjail properties file." + [ "${ezjail_imagetype}" ] && ezjail_imagedata="-c ${ezjail_imagetype} -C '${ezjail_attachparams}' -s ${ezjail_nameprop_imgagesize}" $0 create -a "${ezjail_fromarchive}" -A "${ezjail_config}" ${ezjail_imagedata} -r "${ezjail_rootdir}" "${ezjail_hostname}" "${ezjail_ip}" || exerr "Error: create failed." rm -f "${ezjail_config}" -- cgit v1.2.3