Index: scripts/usb_unmount.sh =================================================================== diff -u -r9966c535d7c6f65134445cb6445724ced1be49ab -r23bf46e34d0a6b72b8d0187812a4d3c26170ca6c --- scripts/usb_unmount.sh (.../usb_unmount.sh) (revision 9966c535d7c6f65134445cb6445724ced1be49ab) +++ scripts/usb_unmount.sh (.../usb_unmount.sh) (revision 23bf46e34d0a6b72b8d0187812a4d3c26170ca6c) @@ -17,12 +17,18 @@ # $1 - usb device # $2 - usb drive + sudo umount $2 -if [ $? == 0 ]; then - echo "" - exit 0 -else - echo "usb drive $2 cannot be unmounted." +if [ $? != 0 ]; then + echo "usb drive '$2' cannot be unmounted." exit 1001 fi +mkdir -p "$2" +if [ $? != 0 ]; then + echo "usb mount point '$2' cannot be removed." + exit 1002 +fi + +echo "" +exit 0 \ No newline at end of file