[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,9 +57,9 @@ if [ "${current_kernel}" != "${available_kernel}" ] && \
paren_children=$(find "${paren_slink}")
if [ -z "${paren_children}" ]; then
echo "${paren_slink} is empty, removing"
fi
rmdir "${paren_slink}" # ignore failure, best effort
fi
fi
done
else
echo "@@ Not upgrading kernels:"