fixes to mount scripts

This commit is contained in:
Hannes
2026-08-20 17:45:44 +02:00
parent e6785a24a7
commit 318420eba6
2 changed files with 52 additions and 46 deletions
+4 -4
View File
@@ -7,10 +7,10 @@ function is_mounted() {
function unmount() {
if is_mounted "$1"; then
if ! sudo umount -l "$1"; then
notify-send -u critical "Unmount failed" "$1"
echo "Unmount failed: $1"
return 1
else
notify-send -u low "Unmount completed" "$1"
echo "Unmount completed: $1"
fi
fi
}
@@ -18,10 +18,10 @@ function unmount() {
function force_unmount() {
if is_mounted "$1"; then
if ! sudo umount -fl "$1"; then
notify-send -u critical "Unmount failed" "$1"
echo "Unmount failed: $1"
return 1
else
notify-send -u low "Unmount completed" "$1"
echo "Unmount completed: $1"
fi
fi
}