On So, 25.10.20 18:56, Marcin Kocur (marcin2006@xxxxxxxxx) wrote: > W dniu 25.10.2020 o 18:36, Marcin Kocur pisze: > > Hello, > > > > as the topic states, I want to know which action(s) from "add", > > "remove", "change", "move", "online", "offline", "bind", and "unbind" > > were triggered on my device. Is there any way to check that? > > > > At the beginning of /usr/lib/udev/rules.d/49-sane.rules there is: > > > > ACTION!="add", GOTO="libsane_rules_end" > > > > Udevadm info doesn't show libsane_matched property for my scanner. > > > > If I trigger the device manually with action "change", the variable is > > still not there, as per the rule. > > > > But if I trigger it with "add", the variable is there and also uaccess > > rule gets executed. > > > > So the ultimate quesiton is: what kind of trigger was executed on my > > device on boot time? > > > Okay, it seems that "bind" is the action executed. I just edit the ACTION > rule and restarted my PC until I found it. The introduction of "bind" and "unbind" is some major kernel API fuck-up btw. It's the main reason why packages should check for !="remove" rather than =="add|change" or so. udev rules written for old kernels simple didn't have to take "bind" and "unbind" into account. The fact that kernel just added that willy-nilly breaks rules all over the place. (that said, sane's apparent use of =="add" was always broken, i.e. the omission of "change", so even without the kernel bind/unbind mess the sane rules already were broken) Also see the NEWS note on the upcoming systemd version 247: https://github.com/systemd/systemd/blob/master/NEWS#L5 > Is this intended? Should I report bug to systemd or sane? The scanner is > connected to my PC all the time. sane. Ask them to run their rules on ACTION!="remove", i.e. on all actions but "remove". And that includes add, bind, change, unbding and everything else that might be added one day. Lennart -- Lennart Poettering, Berlin _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel