fixes to mount scripts
This commit is contained in:
+4
-4
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user