|
|
continue | continue |
fi | 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 | if ! umount "${x}" &>/dev/null; then |
# Kill processes still using this mount | # Kill processes still using this mount |
/bin/fuser -s -k -9 -m "${x}" | /bin/fuser -s -k -9 -m "${x}" |
|
|
| |
for x in $(awk '{print $2}' /proc/mounts | sort -ur) ; do | for x in $(awk '{print $2}' /proc/mounts | sort -ur) ; do |
x=${x//\\040/ } | x=${x//\\040/ } |
if [[ -n $(echo "${x}" | egrep "${RC_NO_UMOUNTS}") ]] ; then |
|
continue |
|
fi |
|
if [[ ${cmd} == "u" ]]; then | if [[ ${cmd} == "u" ]]; then |
umount -n -r "${x}" | umount -n -r "${x}" |
else | else |