summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2006-11-15 19:46:37 +0000
committererdgeist <erdgeist@erdgeist.org>2006-11-15 19:46:37 +0000
commita98c4c8e2928d441b4e1308c32b016f935436849 (patch)
tree17bb8699ab599c45361b9421fb6479f55a7c1ddd /ezjail-admin
parenta0c34d12ee747410814fa6c90e7d45eb4d903ed7 (diff)
More sanity checking.
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin8
1 files changed, 8 insertions, 0 deletions
diff --git a/ezjail-admin b/ezjail-admin
index ee67d83..0eec9e7 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -652,11 +652,19 @@ config)
652 # so check, whether we might be running into problems 652 # so check, whether we might be running into problems
653 [ -e ${ezjail_new_config} -o -e ${ezjail_new_config}.norun ] && exerr "Error: an ezjail config already exists at ${ezjail_new_config}. Please rename the ezjail." 653 [ -e ${ezjail_new_config} -o -e ${ezjail_new_config}.norun ] && exerr "Error: an ezjail config already exists at ${ezjail_new_config}. Please rename the ezjail."
654 654
655 # since we just used the old rootdir prefix and added the new hostname,
656 # we might end up at an existing directory
657 [ -e ${ezjail_new_rootdir} ] && exerr "Error: An object already exists at ${ezjail_new_rootdir}, cant rename."
658
659 # prevent trouble with creating our softlink
660 [ -L ${ezjail_softlink} -a -e ${ezjail_new_softlink} ] && exerr "Error: An object already exists at ${ezjail_new_softlink}, cant create softlink there."
661
655 # need to rename the image? 662 # need to rename the image?
656 if [ -n "${ezjail_image}" ]; then 663 if [ -n "${ezjail_image}" ]; then
657 # Do we have an auto generated image name? 664 # Do we have an auto generated image name?
658 if [ "${ezjail_rootdir}.img" = "${ezjail_image}" ]; then 665 if [ "${ezjail_rootdir}.img" = "${ezjail_image}" ]; then
659 ezjail_new_image=${ezjail_new_rootdir}.img 666 ezjail_new_image=${ezjail_new_rootdir}.img
667 [ -e ${ezjail_new_image} ] && exerr "Error: An object already exists at ${ezjail_new_image}, cant rename image."
660 mv ${ezjail_image} ${ezjail_new_image} 668 mv ${ezjail_image} ${ezjail_new_image}
661 else 669 else
662 ezjail_new_image=${ezjail_image} 670 ezjail_new_image=${ezjail_image}