From: smckown Date: Fri, 2 May 2008 16:03:00 +0000 (+0000) Subject: On umount command, attempt to unregister even if the drive is unmounted. X-Git-Url: https://oss.titaniummirror.com/gitweb?a=commitdiff_plain;h=c1dbc5c1cdb14ee25acebfb32bf1467c22f95cf3;p=ovzbpc.git On umount command, attempt to unregister even if the drive is unmounted. --- diff --git a/esata b/esata index dbff012..0889d93 100755 --- 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 }