You are not logged in.
Pages: 1
Hello everybody. I wanted to ask if someone was kind enough to help me write a udev rules to ensure that a determinated usb, when inserted, is mounted on a specific folder in /mnt
I've seen the guides in debian and arch regarding this site and I was able to write this
[ffantinato@ant-asus rules.d]$ cat 10-personal-rule.rules
ACTION=="add",SUBSYSTEMS=="usb",ATTRS{product}=="STORE N GO",RUN+="/bin/mkdir -p /mnt/%k",RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /mnt/%k"
Performing this
udevadm test /sys/block/sdb
he tells me that it can not mount the block /dev/sdb, and I do not understand why the rule does not take only the block /dev/sdb1
Thanks in advance
Offline
This is the wrong approach, for a couple fo reasons. First, RUN+= will block for long running commands, second, you can accomplish this with udiskie or one of the other automounters.
Offline
I do not understand why the rule does not take only the block /dev/sdb1
Because you're filtering on the device, rather than partition 1 of the device.
Offline
Pages: 1