Linux Hotplug development
 help / color / mirror / Atom feed
From: Alan Jenkins <sourcejedi.lkml@googlemail.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev rule won't execute RUN command
Date: Fri, 13 Nov 2009 12:15:52 +0000	[thread overview]
Message-ID: <9b2b86520911130415l1e02e65dl3a26068d89dafe10@mail.gmail.com> (raw)
In-Reply-To: <1258018126.5051.362.camel@shili-desktop>

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

You wanted "udevadm trigger --action­d", 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­d, 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

      parent reply	other threads:[~2009-11-13 12:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12  9:28 udev rule won't execute RUN command root
2009-11-12 18:26 ` root
2009-11-12 22:52 ` Alan Jenkins
2009-11-13 12:15 ` Alan Jenkins [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b2b86520911130415l1e02e65dl3a26068d89dafe10@mail.gmail.com \
    --to=sourcejedi.lkml@googlemail.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox