Index: halt.sh =================================================================== --- halt.sh (revision 2421) +++ halt.sh (working copy) @@ -106,6 +106,11 @@ continue fi + # If we're using the mount (probably /usr) then don't unmount us + if [[ " $(fuser -m "${x}" 2>/dev/null) " == *" $$ "* ]] ; then + continue + fi + if ! umount "${x}" &>/dev/null; then # Kill processes still using this mount /bin/fuser -s -k -9 -m "${x}" @@ -156,9 +161,6 @@ for x in $(awk '{print $2}' /proc/mounts | sort -ur) ; do x=${x//\\040/ } - if [[ -n $(echo "${x}" | egrep "${RC_NO_UMOUNTS}") ]] ; then - continue - fi if [[ ${cmd} == "u" ]]; then umount -n -r "${x}" else