Hello all.
I want to discuss here a specific idea.
First of all i use for my job only two USB devices. One portable hard disk and a USB flash disk.
I always hated the idea of auto mounting devices and thus on my machine, to be able to mount a device you have to be a root and execute mount/umount commands.
Today i was thinking, instead of executing that whole command as root
Code:
mount -o guid=...,uid=...,umask=... /dev/sdc1/ /mnt/usb
to execute something like
Code:
mount -label WDDisk
for the portable disk
and
Code:
mount -label FlashD
for the flash disk.
The first command should automatically mount the portable disk e.g to /mnt/WD while the second one mount the flash disk in /mnt/FLS.
The thing here, is that how can i make system recognize that the usb device just inserted is the portable disk or the usb flash disk, then assign a label to them and finally to give them a specific mount path.
For example, if i plug the HDD, independently the device block name in /dev/sd*, to be able to recognize that this is the portable disk and if user run "mount -label WDDisk", this should be mounted on the /mnt/WD. Respectively for the USB flash drive. I want that, only for those two devices not for anything else that will someday be plugged into my machine.
Is something like that possible? How should i approach its solution ?
P.S I don't know if this plays a role, but i'm using Arch linux.
Thank you.