Re: udev rule won't execute RUN command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/12/09, root <belle.shi@xxxxxx> wrote:
> thanks to alan,
> i used the command udevadm trigger --action=change, but
> there is no any output,

You wanted "udevadm trigger --action=add", to match the ACTION=="add"
test in your rule.

> so i changed the rule like this:
> ACTION=="add",ATTRS{idVendor}=="0525",NAME="shili",RUN+="/bin/rm
> -rf /home/shili/test/tt.c. but the file /home/shili/test/tt.c is still
> exsit when i plug it in or out,and when i use udevadm trigger
> --action=add, there is still no output in the console.
> BTW:when i plug in the dev the name is changed

udevadm trigger doesn't print anything useful, so that part is
expected.  Given that the NAME="..." is working for this rule, I have
no idea why RUN+="..." isn't working.

Have you looked for errors in the log output, e.g. in
/var/log/messages?  You might try running "udevadm control
--log-priority=info" first, to get more information logged.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux