From 79efdfa0360100b437fa42f9e055a9074a69eff5 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 21 Feb 2007 04:22:08 +0000 Subject: ezjail-admin create now ignores dot files when checking, whether a directory is empty. That way .snap wont mark it non-empty. However, Lost+Found still is a problem. --- ezjail-admin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ezjail-admin') diff --git a/ezjail-admin b/ezjail-admin index de91655..e343e6e 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -278,7 +278,7 @@ create) # if a directory at the specified jail root already exists, refuse to # install. Empty root dirs are considered okay, sometimes they are # mount points to be filled by ezjail. - [ -d ${ezjail_rootdir} ] && [ "`ls -A ${ezjail_rootdir} | wc -l`" -eq 0 ] && ezjail_rootdirempty="YES" + [ -d ${ezjail_rootdir} -a -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." # if jail root specified on command line does not lie within our jail -- cgit v1.2.3