cleanup is now done separately and only if requested. Yes, getting messy ...
[jprojects-scripts.git] / mount-transport.sh
1 #!/bin/sh
2
3 LABEL="Transport"
4 MOUNT_POINT="/media/${USER}/${LABEL}"
5 DEV_PATH="/dev/disk/by-label/${LABEL}"
6 #MOUNT_OPTIONS="rw,nosuid,nodev,noexec,noatime,data=ordered,errors=remount-ro,uid=1000,gid=1000"
7 MOUNT_OPTIONS="rw,nosuid,nodev,noexec,noatime,data=ordered,errors=remount-ro"
8
9 if [ ! -d "${MOUNT_POINT}" ]
10 then
11         sudo mkdir -p ${MOUNT_POINT}
12 fi
13
14 sudo mount -t ext4 -o "${MOUNT_OPTIONS}" "${DEV_PATH}" "${MOUNT_POINT}"