diff options
author | erdgeist <erdgeist@erdgeist.org> | 2012-02-02 20:22:54 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2012-02-02 20:22:54 +0000 |
commit | 5d40480d584d85a2361fa70f2792f7dffbd49c12 (patch) | |
tree | 8604faac29541f525a5d0bb48901704ee4e08eba | |
parent | da4aef57542d34206f9b1f1290c9ab7a8da655ff (diff) |
Make the clone script more end user friendly. Still more to go. Maybe the script will be merged to ezjail-admin one day.RELEASE_3_2_1
-rw-r--r-- | ezjail-clone.sh | 18 |
1 files 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 | |||
34 | # Finally re-locate all files under ezjail/ so that the restore command find them | 34 | # Finally re-locate all files under ezjail/ so that the restore command find them |
35 | repl="${repl} -s:^\.:ezjail:p" | 35 | repl="${repl} -s:^\.:ezjail:p" |
36 | 36 | ||
37 | echo $repl | ||
38 | |||
39 | cd / | 37 | cd / |
40 | pax -wt -x cpio ${ezjail_archive_opt} ${repl} . | 38 | pax -wt -x cpio ${ezjail_archive_opt} ${repl} . |
41 | ezjail_paxresult=$? | 39 | ezjail_paxresult=$? |
42 | 40 | ||
43 | rm -rf /tmp/ezjail_fakeroot/ | 41 | rm -rf /tmp/ezjail_fakeroot/ |
44 | 42 | ||
45 | #unset LANG LC_CTYPE | 43 | # Debug: unset LANG LC_CTYPE |
46 | #find -dE / ! -regex "/(dev|proc|${ezjail_dirlist})/.*" -a ! -regex "/(${ezjail_dirlist})" -a ! -path /tmp/ezjail_fakeroot/usr -a ! -name "${ezjail_archive}" \ | 44 | # Debug: find -dE / ! -regex "/(dev|proc|${ezjail_dirlist})/.*" -a ! -regex "/(${ezjail_dirlist})" -a ! -path /tmp/ezjail_fakeroot/usr -a ! -name "${ezjail_archive}" \ |
45 | |||
46 | if [ ${ezjail_paxresult} -eq 0 ]; then | ||
47 | echo Your system has been archived to ${ezjail_archive} | ||
48 | echo On the destination ezjail installation use the following command to | ||
49 | echo import it as an ezjail: | ||
50 | echo ezjail-admin create -a ./${ezjail_archive} HOSTNAME IP | ||
51 | echo Of course you can use many other switches to ezjail-admin create on | ||
52 | echo the target system as well. | ||
53 | else | ||
54 | echo Your system could not be archived, try the following command to find | ||
55 | echo out why: | ||
56 | fi | ||