From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Razza" Date: Wed, 02 May 2007 12:10:31 +0000 Subject: RE: udev problem DVB-S/T Cards Message-Id: <000301c78cb2$e2455390$a6cffab0$@com> List-Id: References: <000301c78982$db8615e0$929241a0$@com> In-Reply-To: <000301c78982$db8615e0$929241a0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Bryan Kadzban wrote on 02 May 2007 12:08: > Razza wrote: > > I am specifically interested in what 'K' is at various points in this > > rule - > > > > > > BUS="pci", ID="0000:01:06.0", SYSFS{device}="0x7146", > > SYSFS{vendor}="0x1131", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; > > printf dvb/adapter5/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", > MODE="0660" > > Well, it starts out at %k (the kernel NAME, which should be available > via udevinfo). After that, you should be able to set K= in > a normal shell, and then start running subsequent commands from the > shell, while echoing $K from time to time. > > (However, note that udev requires double dollar signs and double > percent signs, so if you paste the various echos and printfs into a > shell, you'll have to un-escape those characters. I.e., %%s should be > run through the shell as %s, and %%%% should be turned into %%.) > > And actually, K only changes once (when it's set to ${K#dvb} just > before the printf. The rest of that rule is just formatting the > output. > > (Oh, and you hopefully already know this from the documentation, but > NAME="%c" sets NAME to the output of the PROGRAM.) Ah! So a udevinfo yields kernels names such as - KERNEL="dvb1.frontend0" So I guess I need to change the K=$${K#dvb} element to only return the correct nodes so I end up with a correctly formatted tree? ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel