diff options
| author | Julien Voisin | 2015-03-03 16:58:40 +0100 |
|---|---|---|
| committer | Julien Voisin | 2015-03-03 17:00:16 +0100 |
| commit | 1b27725e9630788639db4cac8f6231a4c6b8cc17 (patch) | |
| tree | 90833b621dfbc0cfb89d4565aaa47b28fcb36671 | |
| parent | d7b6fcad0bc7c870da2f3390272e7816e62c69cb (diff) | |
Add a check that exits the script if unmount fails
| -rwxr-xr-x | script.sh | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -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" |
| 10 | done \ No newline at end of file | 10 | if [ $? -neq 0 ] |
| 11 | then | ||
| 12 | exit 1 | ||
| 13 | fi | ||
| 14 | done | ||
