Re: Which udev action is run on boot for my device?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On So, 25.10.20 18:36, Marcin Kocur (marcin2006@xxxxxxxxx) wrote:

> 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"

That's a poort choice typically. People should use ACTION=="remove"
checks for this instead. I.e. there's exactly one "negative" action
type, and that's "remove". All others should be considered "positive",
as the device is still around when they happen.

> 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.

Yeah, the rule is broken. udev rules should be written in a style that
a "change" event can be triggered any time, and the devices keep their
properties. Writing rules that only set props on "add" are simply
broken. They set all props on any event but "remove", see above.

Please report to the upstream of the package in question.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux