]> oss.titaniummirror.com Git - ovzbpc.git/commitdiff
On umount command, attempt to unregister even if the drive is unmounted.
authorsmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Fri, 2 May 2008 16:03:00 +0000 (16:03 +0000)
committersmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Fri, 2 May 2008 16:03:00 +0000 (16:03 +0000)
esata

diff --git a/esata b/esata
index dbff012bf55376b9072445e2e32d4e00caf6073e..0889d93da5be98d7d4959489d8fc40479b155a62 100755 (executable)
--- a/esata
+++ b/esata
@@ -55,11 +55,12 @@ dounregister() {
 }
 
 doumount() {
-    mounted || return 0
-    [ -n "$VERBOSE" ] && echo "unmount SATA $DEV"
-    umount "$MNT" || return 1
-    mounted && return 1
-    [ -n "$VERBOSE" ] && echo "unmount ok"
+    if mounted; then
+       [ -n "$VERBOSE" ] && echo "unmount SATA $DEV"
+       umount "$MNT" || return 1
+       mounted && return 1
+       [ -n "$VERBOSE" ] && echo "unmount ok"
+    fi
     dounregister || return 1
     return 0
 }