You are not logged in.

#1 2014-03-01 23:50:18

jakobl
Member
Registered: 2014-03-01
Posts: 2

own udev rule doesn't work at all

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

#2 2014-03-02 07:06:45

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: own udev rule doesn't work at all

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

#3 2014-03-02 11:14:31

jakobl
Member
Registered: 2014-03-01
Posts: 2

Re: own udev rule doesn't work at all

That's it, thanks!

Jakob

Offline

Board footer

Powered by FluxBB