From 1b27725e9630788639db4cac8f6231a4c6b8cc17 Mon Sep 17 00:00:00 2001 From: Julien Voisin Date: Tue, 3 Mar 2015 16:58:40 +0100 Subject: Add a check that exits the script if unmount fails --- script.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'script.sh') diff --git a/script.sh b/script.sh index 8ccbe72..879f0b6 100755 --- a/script.sh +++ b/script.sh @@ -7,4 +7,8 @@ do mount --bind "$name" "$MOUNT_PATH" python ./scanner.py -f "$MOUNT_PATH" -t 1 umount "$MOUNT_PATH" -done \ No newline at end of file + if [ $? -neq 0 ] + then + exit 1 + fi +done -- cgit v1.3