The answer was a fairly long but simple udev rule, and a script to do the mounting.
/etc/udev/rules.d/storage.rules
ATTRS{idVendor}=="0bc2", ATTRS{idProduct}=="5031", ATTRS{serial}=="NA0B3DKV", ENV{DEVTYPE}=="partition", ACTION=="add", RUN+="/usr/local/sbin/mount-storage"
/usr/local/sbin/mount-storage
#!/bin/sh mount -t vfat -o uid=nobody,gid=nogroup,dmask=000,fmask=111 \ "$DEVNAME" /mnt/store
I found how to write the rule after referring to Writing udev rules and an example of a rule that matches the type of device.
It is still required to unmount the disk before unplugging it, as is the case with any operating system at the moment.
No comments:
Post a Comment