![]() The only thing you need to worry about is if you already have regular directories in /media/pi with the same names as a USB drive. I used the normal process to install it: sudo apt-get install pmount The best solution I have found for this is using the pmount service. When I plug in multiple USB disks with the same label, I can still distinguish them as, for example: /media/500G_sdb1 So, I normally label my USB drives with their capacity. In case a partition has no label, it will just be /media/. The mount points/folders names will be in the format of /media/_. In /usr/local/bin/automount, and then: sudo chmod +x /usr/local/bin/automount My version based on the answer above: Systemd serviceįS_LABEL=`lsblk -o name,label | grep $ Thanks to avanc for his udev rule and service.The amount of mountpoints can be changed.You can change pmount parameters, but these allow anyone r/w access to usb.Give execute permission to the (root) user: chmod u+x /usr/local/bin/cpmount usr/bin/pmount -umask 000 -noatime -w -sync $1 usb1 usr/bin/pmount -umask 000 -noatime -w -sync $1 usb2 usr/bin/pmount -umask 000 -noatime -w -sync $1 usb3 usr/bin/pmount -umask 000 -noatime -w -sync $1 usb4 Insert: ACTION="add", KERNEL="sd", TAG+="systemd", Save and close If you want a cleaner look, don't create any folders. ![]()
0 Comments
Leave a Reply. |