diff options
author | erdgeist <erdgeist@erdgeist.org> | 2006-03-06 18:24:50 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2006-03-06 18:24:50 +0000 |
commit | 5d92d199792b1e84826a63cb3ecc852abb9cee2c (patch) | |
tree | 755cefd08da352af1ba6e78f16e6a9903c76c759 /ezjail-admin | |
parent | 7e299c2c8676611dea136c4e8e0d9e6d0b3d70f8 (diff) |
Check, that noone creates a jail called "fulljail"
Diffstat (limited to 'ezjail-admin')
-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." |