Run a program based on two devices creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi gentlemen, 

Nice to see you.

Here is my situation:
I have a program chang-lids, i want it to be run when the following two
conditions comes true,
(1) "/dev/ttyAS1" created.
(2) "/dev/mcuserv.0" created.

Here is what i did:
1) put the change-lids into /lib/udev
2) creat a file /etc/udev/rules.d/75-smcu.
rules which contains:
    ACTION=="add", KERNEL=="mcuserv.0", RUN+="/lib/udev/change-lids"

I found that the "/dev/ttyAS1" has not been created, when the
change-lids was called, so change-lids  failed when trying to open the
"/dev/ttyAS1" with a new line discipline.

Does anyone have a good suggestion about this issue?

Thanks in advance!


Jerry


--
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

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux