Search code examples
systemdudev

systemd-udev rule applied multiple times (twice in my case)


I have udev rule with the following content:

DRIVERS=="adt7310",  RUN+="/bin/ln -s /sys//devices/platform/soc/fff00000.spi/spi_master/spi0/spi0.0/temp1_input /dev/temperature_adt"

The problem is that this rule is applied twice and in the log appears annoying line:

localhost systemd-udevd[1104]: Process '/bin/ln -s /sys//devices/platform/soc/fff00000.spi/spi_master/spi0/spi0.0/temp1_input /dev/temperature_adt' failed with exit code 1.

I have seen a lot of similar issues over the internet and many of them still unresolved. But most of them were about PC's and quite complicated rules. Here it is an embedded system, the link is created, nothing wrong happens but I simply don't know what to tell to QA people...

Thanks


Solution

  • Please be very careful when writing rules and especially when you are taking someone else rules. Always run

    udevadm info -a /sys/...device

    and read very carefully the information. In my case the solution is

    DRIVER=="adt7310" instead of DRIVERS=="adt7310"

    My apologies