Ludovic Rousseau wrote:
Hello I am trying replace the active polling of the USB bus in pcscd by a udev event. I see that OpenCT has a udev rule file etc/openct.udev that starts the script etc/openct_usb. This etc/openct_usb script does: [...] # race condition in the kernel, $DEVICE might not exist now sleep 1 [...] I also have the same problem with udev. The event is sent before the device is really present in /sys/ and then pcscd do not see it :-( udev provides the WAIT_FOR_SYSFS="foo" option and is documented as: WAIT_FOR_SYSFS Wait for the specified sysfs file of the device to be created. Can be used to fight against kernel sysfs timing issues. So I use WAIT_FOR_SYSFS="dev" in my udev file but the rule is executed 6 seconds after the reader is plugged in. Not nice for a hotplug mechanism. I also have two lines in /var/log/daemon.log: Oct 23 16:02:55 neo udevd-event[14830]: wait_for_sysfs: waiting for '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2.3/dev' failed Oct 23 16:02:59 neo udevd-event[14832]: wait_for_sysfs: waiting for '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2.3/2-2.3:1.0/dev' failed Am I doing something wrong?
The rules I see show WAIT_FOR_SYSFS="bus" sounds like you may bew waiting on the wrong syslink I see in the log after pluging in a reader for /sys/devices/pci0000:00/0000:00:1f.2/usb1/1-1/1-1:1.0/bus where bus is a symlink to ../../../../../../bus/usb. You might also get more info from the log if you set the /etc/udev/udev.conf udev_log="debug" or use the command udevcontrol log_print=7 to change it dynamicly, then look in the logs to see what else it says. This was on Ubuntu Edgy, with udev-093-0ubuntu18
I am using udev 079-0ubuntu34 (Ubuntu Dapper). Is this corrected in a newer version of udev? (latest version is 100) Any udev expert here? Thanks,
-- Douglas E. Engert <[EMAIL PROTECTED]> Argonne National Laboratory 9700 South Cass Avenue Argonne, Illinois 60439 (630) 252-5444 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel