summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-12-07 17:59:10 (EST)
committer P. J. McDermott <pj@pehjota.net>2014-12-07 17:59:29 (EST)
commitd67f89a24d6de539ec904380eec91197d15a692a (patch)
treeef7d03eea859fdc46064198854539071c6738251
parentec1f5c1808ab3dcb1c1099a44bc8709a0c61c7d6 (diff)
Check if device is mounted
-rw-r--r--debeagle.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/debeagle.sh b/debeagle.sh
index 6b9b575..ecb7588 100644
--- a/debeagle.sh
+++ b/debeagle.sh
@@ -60,6 +60,9 @@ main()
else
error 1 'Device %s not found\n' "${target}"
fi
+ if grep "^${target}" /proc/mounts; then
+ error 1 'Device %s mounted\n' "${target}"
+ fi
}
print_usage()