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