empty config files should not be marked for exists

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-04-11 13:41:17 +01:00
parent bd0d295eaf
commit 9844e5f82f

View File

@ -37,7 +37,9 @@ KEY=$(echo $2 | sed 's@^/@@')
if [ $1 == "exists" ] if [ $1 == "exists" ]
then then
[ -e ${BASE}/${KEY} ] && exit 0 || exit 1 [ -d ${BASE}/${KEY} ] && exit 0
[ -f ${BASE}/${KEY} -a ! -z "$(cat ${BASE}/${KEY})" ] && exit 0
exit 1
fi fi
if [ $1 == "dir" ] if [ $1 == "dir" ]