Hide Forgot
we've got a special usb device, and when we plug/unplug we write our own rules which is working properly except one thing. during the boot this lines in udev: ACTION=="remove", DEVLINKS=="/dev/foo_ups", RUN+="/usr/libexec/foo/liebert-udev" we always got this during boot: Starting udev: udevd[476]: unknown key 'DEVLINKS' in /etc/udev/rules.d/10-foo.rules:11 since there is no other way during remove a usb-serial adapter then DEVLINKS we can't find other ways to write the rules. and anyway why it's a problem if it's work properly after boot.
try: ACTION=="remove", SYMLINKS=="foo_ups", RUN+="/usr/libexec/foo/liebert-udev"
sorry: ACTION=="remove", SYMLINK=="foo_ups", RUN+="/usr/libexec/foo/liebert-udev"
it's not working while the original was working:-( anyway it's a simple serial to usb converter so you can also try. the add line was: ACTION=="add", KERNEL=="ttyUSB[0-9]", SYSFS{idVendor}=="058f", SYSFS{idProduct}=="9720", SYMLINK+="foo_ups", RUN+="/usr/libexec/foo/liebert-udev" the problem is that udev don't give back the SYSFS and SYMLINK parameter in case of remove.
(In reply to comment #4) > it's not working while the original was working:-( > anyway it's a simple serial to usb converter so you can also try. the add line > was: > ACTION=="add", KERNEL=="ttyUSB[0-9]", SYSFS{idVendor}=="058f", > SYSFS{idProduct}=="9720", SYMLINK+="foo_ups", > RUN+="/usr/libexec/foo/liebert-udev" > > the problem is that udev don't give back the SYSFS and SYMLINK parameter in > case of remove. Yes, because the SYMLINK is removed, there is no more sysfs entry anymore, because the device already disappeared.
try the ENV{REMOVE_CMD}: ACTION=="add", KERNEL=="ttyUSB[0-9]", SYSFS{idVendor}=="058f", SYSFS{idProduct}=="9720", SYMLINK+="foo_ups", RUN+="/usr/libexec/foo/liebert-udev", ENV{REMOVE_CMD}="/usr/libexec/foo/liebert-udev"
it's still not working:-( anyway the original problem was that the system gives an error during boot. and the original rule is working:-) but if you've any other tip we can try it...
ok the exact situatuion is that your solution working on rhel-6, but not on rhel-5, but we find the solution: http://comments.gmane.org/gmane.linux.hotplug.devel/14254 after we add this line: ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" it's working on both rhel-6 and rhel-5:-)