diff options
-rwxr-xr-x | ezjail-admin | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ezjail-admin b/ezjail-admin index 093a755..3ea5aa7 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -71,6 +71,12 @@ create) | |||
71 | newjail_nname=`echo -n "${newjail_name}" | tr -c [:alnum:] _` | 71 | newjail_nname=`echo -n "${newjail_name}" | tr -c [:alnum:] _` |
72 | newjail_root=${newjail_root:-"${ezjail_jaildir}/${newjail_name}"} | 72 | newjail_root=${newjail_root:-"${ezjail_jaildir}/${newjail_name}"} |
73 | 73 | ||
74 | # This scenario really will only lead to real troubles in the 'fulljail' | ||
75 | # case, but I should still explain this to the user and not claim that | ||
76 | # "an ezjail would already exist" | ||
77 | [ "${newjail_nname}" = "basejail" -o "${newjail_nname}" = "newjail" -o "${newjail_nname}" = "fulljail" -o "${newjail_nname}" = "flavours" ] && \ | ||
78 | exerr "Error: ezjail needs the ${newjail_nname} directory for its own administrative purposes. Please rename the ezjail." | ||
79 | |||
74 | # jail names may lead to identical configs, eg. foo.bar.com == foo-bar.com | 80 | # jail names may lead to identical configs, eg. foo.bar.com == foo-bar.com |
75 | # so check, whether we might be running into problems | 81 | # so check, whether we might be running into problems |
76 | [ -e ${ezjail_jailcfgs}/${newjail_nname} ] && exerr "Error: an ezjail config already exists at ${ezjail_jailcfgs}/${newjail_nname}. Please rename the ezjail." | 82 | [ -e ${ezjail_jailcfgs}/${newjail_nname} ] && exerr "Error: an ezjail config already exists at ${ezjail_jailcfgs}/${newjail_nname}. Please rename the ezjail." |