I'm using a Debian wheezy stable and I'm trying to automatically mount a specific usb device in a designated directory when it's plugged (not at boot time or with the mount command).
I know how to mount my device in the directory I want with /etc/fstab and the mount -a command with this /etc/fstab:
UUID="xxxxxxxxxxxxxxxx" /media/myFolder ntfs auto,exec,rw,user,suid,uid=1000 0 0
I also know how to use usbmount to mount a device when it is plugged.
My problem is that usbmount mounts the device in a folder /media/usbX and not in the directory specified in fstab.
I didn't find how to change the configuration of usbmount to make it respect the /etc/fstabfile.
Is it possible and if so how can I do it?
Check out MOUNTPOINTS in /etc/usbmount/usbmount.conf.
# Mountpoints: These directories are eligible as mointpoints for
# removable storage devices. A newly plugged in device is mounted on
# the first directory in this list that exists and on which nothing is
# mounted yet.
MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3
/media/usb4 /media/usb5 /media/usb6 /media/usb7"