Check, that noone creates a jail called "fulljail"
This commit is contained in:
parent
7e299c2c86
commit
5d92d19979
@ -71,6 +71,12 @@ create)
|
|||||||
newjail_nname=`echo -n "${newjail_name}" | tr -c [:alnum:] _`
|
newjail_nname=`echo -n "${newjail_name}" | tr -c [:alnum:] _`
|
||||||
newjail_root=${newjail_root:-"${ezjail_jaildir}/${newjail_name}"}
|
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
|
# jail names may lead to identical configs, eg. foo.bar.com == foo-bar.com
|
||||||
# so check, whether we might be running into problems
|
# 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."
|
[ -e ${ezjail_jailcfgs}/${newjail_nname} ] && exerr "Error: an ezjail config already exists at ${ezjail_jailcfgs}/${newjail_nname}. Please rename the ezjail."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user