On Thu, Nov 20, 2008 at 15:37, Karl O. Pinc <kop@xxxxxxxx> wrote: > On 11/20/2008 12:30:19 AM, Kay Sievers wrote: >> >> On Thu, Nov 20, 2008 at 06:47, Karl O. Pinc <kop@xxxxxxxx> wrote: >> > I've written a udev rule and am looking >> > for comment by those with more experience >> > to see if there are improvements to be made. >> > KERNEL=="ttyUSB0", ACTION=="add", WAIT_FOR_SYSFS="subsystem/ttyUSB0" >> > >> The device you get the event for has only a single attribute, called >> "dev" and there is never a need to wait for that. WAIT_FOR* is to work >> around (in most cases broken and should be fixed) sysfs timing issues >> in the kernel. Seems, there is nothing in your event where that would >> be needed. >> >> What are you trying to wait for? > > I am trying to wait long enough that at startup the ldc4linux > daemon does not log the error: We can be sure, the device file is there before any RUN+= instructions are executed. You can not wait for anything here. > Nov 19 16:15:00 mustard LCD4Linux[15799]: Pertelian: open(/dev/ttyUSB0) > failed: No such file or directory > > It seems to work anyway, but I interpret the error to mean that > something in udev has not finished by the time the daemon > starts. I don't get the error if I start lcd4linux > manually after plugging in the lcd panel. I guess the event for the serial device, not the only the tty, matches your rule too, and you try to start the daemon twice. Try adding SUBSYSTEM=="tty". And remove the WAIT_FOR* rule, it will not do anything, but print an error after 10 seconds. Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html