summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Voisin2015-03-03 16:58:40 +0100
committerJulien Voisin2015-03-03 17:00:16 +0100
commit1b27725e9630788639db4cac8f6231a4c6b8cc17 (patch)
tree90833b621dfbc0cfb89d4565aaa47b28fcb36671
parentd7b6fcad0bc7c870da2f3390272e7816e62c69cb (diff)
Add a check that exits the script if unmount fails
-rwxr-xr-xscript.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/script.sh b/script.sh
index 8ccbe72..879f0b6 100755
--- a/script.sh
+++ b/script.sh
@@ -7,4 +7,8 @@ do
7 mount --bind "$name" "$MOUNT_PATH" 7 mount --bind "$name" "$MOUNT_PATH"
8 python ./scanner.py -f "$MOUNT_PATH" -t 1 8 python ./scanner.py -f "$MOUNT_PATH" -t 1
9 umount "$MOUNT_PATH" 9 umount "$MOUNT_PATH"
10done \ No newline at end of file 10 if [ $? -neq 0 ]
11 then
12 exit 1
13 fi
14done