From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bryan Kadzban Date: Wed, 02 May 2007 11:08:15 +0000 Subject: Re: udev problem DVB-S/T Cards Message-Id: <4638711F.7030204@kadzban.is-a-geek.net> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1101203402==" List-Id: References: <000301c78982$db8615e0$929241a0$@com> In-Reply-To: <000301c78982$db8615e0$929241a0$@com> To: linux-hotplug@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1101203402== Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig6616A73D177A748DDB7F226F" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6616A73D177A748DDB7F226F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Razza wrote: > I am specifically interested in what 'K' is at various points in this > rule - >=20 >=20 > BUS=3D=3D"pci", ID=3D=3D"0000:01:06.0", SYSFS{device}=3D=3D"0x7146",=20 > SYSFS{vendor}=3D=3D"0x1131", PROGRAM=3D"/bin/sh -c 'K=3D%k; K=3D$${K#dv= b}; > printf dvb/adapter5/%%s $${K%%%%.*} $${K#*.}'", NAME=3D"%c", > MODE=3D"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=3D 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=3D"%c" sets NAME to the output of the PROGRAM.) --------------enig6616A73D177A748DDB7F226F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGOHElS5vET1Wea5wRA8ECAKCdW2VNFzbTuVXJr2zyB02bo3YDmQCgj2Sc Hqx4h7A6FGmFkIODtD7BTH4= =iBPc -----END PGP SIGNATURE----- --------------enig6616A73D177A748DDB7F226F-- --===============1101203402== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ --===============1101203402== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1101203402==--