From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhangb Date: Mon, 30 Nov 2009 09:00:54 +0000 Subject: Run a program based on two devices creation Message-Id: <1259571654.11522.3.camel@localhost> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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