[scripts] automatic kernel upgrade: remove empty directory only when it's empty

This commit is contained in:
Fabio Erculiani 2012-10-17 15:11:56 +02:00
parent dbc7e1cd33
commit d5e926ac44

View File

@ -57,8 +57,8 @@ if [ "${current_kernel}" != "${available_kernel}" ] && \
paren_children=$(find "${paren_slink}")
if [ -z "${paren_children}" ]; then
echo "${paren_slink} is empty, removing"
rmdir "${paren_slink}" # ignore failure, best effort
fi
rmdir "${paren_slink}" # ignore failure, best effort
fi
done
else