the -a operator evaluates from right to left

This commit is contained in:
erdgeist 2007-02-22 16:21:32 +00:00
parent 2cb3c00485
commit a6e66c0450

View File

@ -278,7 +278,7 @@ create)
# if a directory at the specified jail root already exists, refuse to # if a directory at the specified jail root already exists, refuse to
# install. Empty root dirs are considered okay, sometimes they are # install. Empty root dirs are considered okay, sometimes they are
# mount points to be filled by ezjail. # mount points to be filled by ezjail.
[ -d ${ezjail_rootdir} -a -z "`ls -I ${ezjail_rootdir}`" ] && ezjail_rootdirempty="YES" [ -d ${ezjail_rootdir} ] && [ -z "`ls -I ${ezjail_rootdir}`" ] && ezjail_rootdirempty="YES"
[ -e ${ezjail_rootdir} -a -z "${ezjail_rootdirempty}" -a -z "${ezjail_exists}" ] && exerr "Error: the specified jail root ${ezjail_rootdir} already exists." [ -e ${ezjail_rootdir} -a -z "${ezjail_rootdirempty}" -a -z "${ezjail_exists}" ] && exerr "Error: the specified jail root ${ezjail_rootdir} already exists."
# if jail root specified on command line does not lie within our jail # if jail root specified on command line does not lie within our jail