You are not logged in.
Pages: 1
Hi,
I've trouble to write my own udev rule. I tried the following but it doesn't work at all.
I created the following file /etc/udev/rules.d/90-monitor-hotplug.rules with the following content:
# test
SUBSYSTEMS="usb", RUN+="/bin/sh -c '/bin/echo mon >> /tmp/monitor.log'"
run
> udevadm control --reload
Now I assumed with every usb event, e.g plugin of an usb memory stick it should spam something in /tmp/monitor.log
But nothing happens.
Can anybody tell me what I'm doing wrong. I guess it's something really stupid.
Thanks
Jakob
Offline
You haven't used an equality operator in your first line (2x "="). Other than that, it looks fine to me.
So try:
# test
SUBSYSTEMS=="usb", RUN+="/bin/sh -c '/bin/echo mon >> /tmp/monitor.log'"
run
> udevadm control --reload
Burninate!
Offline
That's it, thanks!
Jakob
Offline
Pages: 1