On Fri, Aug 7, 2009 at 14:54, vijay manchala<manchala07@xxxxxxxxx> wrote: > I reloaded the udevcontrol command and even rebooted also Udev picks up changes by itself, no command or resboot is needed. > But My module is not getting inserted, Adding a rule does not cause any event to happen which executes the rule. You have to re-trigger or re-plug the device to get the rule executed. > instead I saw error message in /var/log/messages as below > udev_rules_init: could not read '/etc/udev/rules.d/10-local.rules': No such file or directory Are you sure it's a plain and readable file? > below is my udev rule > > BUS!="usb", ACTION!="add", GOTO="test_add_end" The two negations need both be true to get active. That does not look like it will do what you want. BUS is SUBSYSTEMS since long. BUS might go away at any time. > BUS=="usb", SYSFS{idVendor}=="xxxx", SYSFS is ATTRS since long, SYSFS might also go away at any time. > SYSFS{idProduct}=="xxxx", ACTION=="add", RUN+="/sbin/insmod /lib/modules/2.6.18-92.el5.1/kernel/drivers/usb/input/testpedal.ko" > LABEL="test_add_end" Modules are loaded by modprobe configuration, by supplying an alias from the module itself or a modprobe config. Doing it with udev rules seems kinda wrong. > KERNEL=="event*", SYSFS{idVendor}=="ffff", SYSFS{idProduct}=="0000", \ > ACTION=="add", NAME="input/%k", SYMLINK+="test_pedal", OPTIONS="remove_symlinks" There is no such OPTION as "remove_symlinks". > BUS!="usb", ACTION!="remove", GOTO="test_remove_end" > BUS=="usb", SYSFS{idVendor}=="ffff", SYSFS{idProduct}=="0000", \ > ACTION=="remove", RUN+="/sbin/rmmod testpedal" You can never match on sysfs properties with a remove event, there is no sysfs anymore at that time. Also we usually do not remove any loaded modules ever. If you have two devices, removing one of the devices might kill the second one, this sounds pretty bad to do. > please let me know if am doing wrong. Well, ... :) Good luck, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html