[scripts] automatic kernel upgrade: remove empty directory only when it's empty
This commit is contained in:
parent
dbc7e1cd33
commit
d5e926ac44
@ -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:"
|
||||
|
Loading…
Reference in New Issue
Block a user