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?