From: root <belle.shi@yy.com>
To: linux-hotplug@vger.kernel.org
Subject: udev rule won't execute RUN command
Date: Thu, 12 Nov 2009 09:28:46 +0000 [thread overview]
Message-ID: <1258018126.5051.362.camel@shili-desktop> (raw)
dear all:
The rule I've created is in .60-shili-test.rules and is as follows:
KERNELS="1-6",ATTRS{idVendor}="0525",NAME="shili",RUN+="/bin/rm
-rf /home/shili/test/tt.c"
and the udevtest show:
------------------------------------------------------------------
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
parse_file: reading '/etc/udev/rules.d/60-shili-test.rules' as rules
file
parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules
file
parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules
file
udev_rules_new: rules use 456 bytes tokens (38 * 12 bytes), 314 bytes
buffer
udev_rules_new: temporary index used 500 bytes (25 * 20 bytes)
udev_device_new_from_syspath: device 0xb83da738 has devpath
'/devices/pci0000:00/0000:00:1d.7/usb1/1-6'
udev_device_new_from_syspath: device 0xb83da8d8 has devpath
'/devices/pci0000:00/0000:00:1d.7/usb1/1-6'
udev_device_read_db: device 0xb83da8d8 filled with db symlink data
'/dev/shili'
udev_rules_apply_to_event: NAME
'shili' /etc/udev/rules.d/60-shili-test.rules:1
udev_rules_apply_to_event: RUN ''/bin/rm
-rf /home/shili/test/tt.c'' /etc/udev/rules.d/60-shili-test.rules:1
udev_device_update_db: create db link (shili)
udev_node_add: creating device node '/dev/shili', devnum\x189:21,
mode\x0660, uid=0, gid=0
udev_node_mknod: preserve file '/dev/shili', because it has correct
dev_t
udevadm_test: run: '/bin/rm -rf /home/shili/test/tt.c'
----------------------------------------------------------------
but when i check the file /home/shili/test/tt.c, it still exsit,why?
i've try lots of ways, but it still can't work, need your help, thanks
in advance!
next reply other threads:[~2009-11-12 9:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 9:28 root [this message]
2009-11-12 18:26 ` udev rule won't execute RUN command root
2009-11-12 22:52 ` Alan Jenkins
2009-11-13 12:15 ` Alan Jenkins
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=1258018126.5051.362.camel@shili-desktop \
--to=belle.shi@yy.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