Index: scripts/usb_unmount.sh =================================================================== diff -u -rccddb9de7bc94036e130e034b1de67dca00e028d -r468de49b0616e53a79b1100d9dbc87a7ca82e2b0 --- scripts/usb_unmount.sh (.../usb_unmount.sh) (revision ccddb9de7bc94036e130e034b1de67dca00e028d) +++ scripts/usb_unmount.sh (.../usb_unmount.sh) (revision 468de49b0616e53a79b1100d9dbc87a7ca82e2b0) @@ -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