From 37190460560008620ff7d44a36407cb8953e125c Mon Sep 17 00:00:00 2001 From: timoxa0 Date: Sun, 3 Nov 2024 14:09:50 +0500 Subject: [PATCH] functions: Use recursize umount --- common.d/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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