Udev Rule does not work on Ubuntu 17.10

1

I'm trying a couple of rules udev in Ubuntu 17.10 . These udev rules should execute sendos scripts when you connect or disconnect a pendrive .

The udev rules are:

KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", RUN+="/usr/bin/pendrive-reminder/usbdevinserted.sh"

SUBSYSTEM=="usb", ACTION=="unbind", RUN+="/usr/bin/pendrive-reminder/usbdevgone.sh $devpath"
SUBSYSTEM=="usb", ACTION=="remove", RUN+="/usr/bin/pendrive-reminder/usbdevgone.sh $devpath"

I have tried it in previous versions of Ubuntu and they work perfectly, but in the version 17.10 no longer work.

I have installed udev with:

sudo apt install udev

And I have raised the service with:

sudo systemctl start udev

But the udev rules are still not executed.

How can I solve it?

UPDATE

After restarting the service with:

systemctl restart udev

already works. But now it turns out that, when rebooting the system, it is deactivated again, and I have to restart the service again so that the rules work.

How could I solve it?

    
asked by AlmuHS 07.04.2018 в 00:43
source

1 answer

1

Solved:

It seems to be a bug of this version of Ubuntu, so, finally, I have solved it with a cron task that restarts udev when the system starts.

To restart the service I use the command:

systemctl restart udev
    
answered by 07.04.2018 / 02:01
source