From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Jenkins Date: Fri, 13 Nov 2009 12:15:52 +0000 Subject: Re: udev rule won't execute RUN command Message-Id: <9b2b86520911130415l1e02e65dl3a26068d89dafe10@mail.gmail.com> List-Id: References: <1258018126.5051.362.camel@shili-desktop> In-Reply-To: <1258018126.5051.362.camel@shili-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On 11/12/09, root wrote: > thanks to alan, > i used the command udevadm trigger --action=3Dchange, but > there is no any output, You wanted "udevadm trigger --action=ADd", to match the ACTION=3D"add" test in your rule. > so i changed the rule like this: > ACTION=3D"add",ATTRS{idVendor}=3D"0525",NAME=3D"shili",RUN+=3D"/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=3D"..." is working for this rule, I have no idea why RUN+=3D"..." 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=3Dinfo" first, to get more information logged. Alan