summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2008-06-01 01:22:05 +0000
committererdgeist <erdgeist@erdgeist.org>2008-06-01 01:22:05 +0000
commit53154945296b74e03dc4e1821ef4ce2fbb8fddb6 (patch)
treebb4b27ee532d14056b16666d9bb5bae29f8b2802 /ezjail-admin
parent6c44af6f908390fda803364b1d4155b949fe0242 (diff)
Saving config from archive to tempfile in order to source it
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin7
1 files changed, 7 insertions, 0 deletions
diff --git a/ezjail-admin b/ezjail-admin
index da65082..443ee09 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -951,6 +951,13 @@ restore)
951 [ "${ezjail_hsname}" != "${ezjail_nameprop_hsname}" ] && exerr "Error: Archive was created on host named ${ezjail_hsname}. Can only use restore on the same machine. Consider using \"ezjail-admin create -a\" when migrating ezjails." 951 [ "${ezjail_hsname}" != "${ezjail_nameprop_hsname}" ] && exerr "Error: Archive was created on host named ${ezjail_hsname}. Can only use restore on the same machine. Consider using \"ezjail-admin create -a\" when migrating ezjails."
952 [ "${ezjail_hscpu}" != "${ezjail_nameprop_hscpu}" ] && exerr "Error: Archive was created on a different CPU. Can not restore. Consider using \"ezjail-admin create -a\" when migrating ezjails." 952 [ "${ezjail_hscpu}" != "${ezjail_nameprop_hscpu}" ] && exerr "Error: Archive was created on a different CPU. Can not restore. Consider using \"ezjail-admin create -a\" when migrating ezjails."
953 953
954 # Save config to tempfile and source it
955 tmpfile=`mktemp /tmp/ezjail.prop.XXXXXXXX`
956 [ $? -ne 0 ] && exerr "Error: Can't create temporary file."
957 pax -rzn -s:${ezjail_nameprop}:${tmpfile}: -f ${ezjail_fromarchive} ${ezjail_nameprop}
958 . "${tmpfile}"
959 rm -f "${tmpfile}"
960
954 shift 1 961 shift 1
955 done 962 done
956 ;; 963 ;;