I've been trying for a very long while to learn to write
udev rules, but I've mostly been unsuccessful, or rather, successful by chance, which is hardly better, as it implies no understanding whatsoever of what I'm doing.
My game, today, was to create a symlink for a loop device (
loop7) and set the device's group to
cdrom (I might elaborate some time later why I need that). So, here is what I learned:
- at least for the
GROUP=directive, the latest item in the
- to test the modifications, the best thing is to generate a synthetic
addusing the following snippet:
echo add > /sys/block/loop7/ueventMany thanks to Marco d'Itri for this information !
With that in mind, the following snippet worked for me, under the name
KERNEL=="loop7", SYMLINK="videoloop", GROUP="cdrom"