diff --git a/common.d/functions.sh b/common.d/functions.sh index 9f152f3..6b61366 100644 --- a/common.d/functions.sh +++ b/common.d/functions.sh @@ -27,7 +27,7 @@ umount_if_mouted() { [ ! -d "$1" ] && return 1 if grep -qs "$(realpath "$1")" /proc/mounts; then - umount "$1" + umount -R "$1" return $? else return 0 @@ -38,7 +38,7 @@ umount_force() { [ ! -d "$1" ] && return 1 for run in {1..5}; do - umount_if_mouted "$1" && break + umount -R "$1" && break log "Failed to umount $1. Trying again after 3 seconds" ierror sleep 3 done