From 5d40480d584d85a2361fa70f2792f7dffbd49c12 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 2 Feb 2012 20:22:54 +0000 Subject: Make the clone script more end user friendly. Still more to go. Maybe the script will be merged to ezjail-admin one day. --- ezjail-clone.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ezjail-clone.sh b/ezjail-clone.sh index f2fc4bf..5483166 100644 --- a/ezjail-clone.sh +++ b/ezjail-clone.sh @@ -34,13 +34,23 @@ repl="${repl} -s:^./tmp/ezjail_fakeroot/usr$::p -s:^./tmp/ezjail_fakeroot/:ezjai # Finally re-locate all files under ezjail/ so that the restore command find them repl="${repl} -s:^\.:ezjail:p" -echo $repl - cd / pax -wt -x cpio ${ezjail_archive_opt} ${repl} . ezjail_paxresult=$? rm -rf /tmp/ezjail_fakeroot/ -#unset LANG LC_CTYPE -#find -dE / ! -regex "/(dev|proc|${ezjail_dirlist})/.*" -a ! -regex "/(${ezjail_dirlist})" -a ! -path /tmp/ezjail_fakeroot/usr -a ! -name "${ezjail_archive}" \ +# Debug: unset LANG LC_CTYPE +# Debug: find -dE / ! -regex "/(dev|proc|${ezjail_dirlist})/.*" -a ! -regex "/(${ezjail_dirlist})" -a ! -path /tmp/ezjail_fakeroot/usr -a ! -name "${ezjail_archive}" \ + +if [ ${ezjail_paxresult} -eq 0 ]; then + echo Your system has been archived to ${ezjail_archive} + echo On the destination ezjail installation use the following command to + echo import it as an ezjail: + echo ezjail-admin create -a ./${ezjail_archive} HOSTNAME IP + echo Of course you can use many other switches to ezjail-admin create on + echo the target system as well. +else + echo Your system could not be archived, try the following command to find + echo out why: +fi -- cgit v1.2.3