Run a program based on two devices creation
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