summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}