Index: scripts/usb_mount.sh =================================================================== diff -u -r9966c535d7c6f65134445cb6445724ced1be49ab -r23bf46e34d0a6b72b8d0187812a4d3c26170ca6c --- scripts/usb_mount.sh (.../usb_mount.sh) (revision 9966c535d7c6f65134445cb6445724ced1be49ab) +++ scripts/usb_mount.sh (.../usb_mount.sh) (revision 23bf46e34d0a6b72b8d0187812a4d3c26170ca6c) @@ -18,12 +18,19 @@ # $1 - usb device # $2 - usb drive # eg. sudo mount -o "noexec,sync,nodev,nosuid" /dev/sda1 /media/usb/ -sudo mount -o uid=denali,gid=denali,umask=077,noexec,sync,nodev,nosuid $1 $2 -if [ $? == 0 ]; then - echo "" - exit 0 -else - echo "usb drive $2 cannot be mounted." + +USER=root # change to leahi after Cybersecurity implementation +mkdir -p "$2" +if [ $? 1= 0 ]; then + echo "usb mount point folder '$2' cannot be made." exit 1001 fi +sudo mount -o uid=${USER},gid=${USER},umask=077,noexec,sync,nodev,nosuid "$1" "$2" +if [ $? != 0 ]; then + echo "usb device '$1' cannot be mounted." + exit 1002 +fi + +echo "" +exit 0 \ No newline at end of file