You are not logged in.
Hi, bit of a different question this time around. Been doing some tinkering and for a while I was using a udev rule to change my backlight permissions to accept "wheel" modifications, allowing me to directly manipulate the backlight values. For a while, I thought this was the ideal solution, udev is pulled from systemd so it's extra-dependency free, but now I came across tmpfiles.d from systemd as well. From a quick glance, it seems to allow a value of things, writing and modifying permissions, which is actually what I've been udev for. I know udev has a lot more power than just permissions, so I wonder if its more appropriate for my use-case to keep these sorts of things on tmpfiles vs udev.
Basically, I'm just trying to understand the semantics of a tmpfile vs a udev rule. Is one semantically more correct? Am I using tmpfiles correctly, or am I misunderstanding what it's designed for?
Last edited by Frontear (2023-09-27 13:24:40)
Offline
udev responds to HW events, tmpfiles unconditionally tinkers with the filesystem.
You can probably use the latter to alter permissions of a device node that is present in a static location before tmpfiles acts, but it won't help you creating a symlink for a device node that shows up in a random location somewhen during runtime when you plug some usb dongle.
Offline
udev responds to HW events, tmpfiles unconditionally tinkers with the filesystem.
You can probably use the latter to alter permissions of a device node that is present in a static location before tmpfiles acts, but it won't help you creating a symlink for a device node that shows up in a random location somewhen during runtime when you plug some usb dongle.
Right good point, tmpfiles wouldn't be able to "react" to new devices or files the way udev could. That's a good thing to consider for sure
Offline