From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Svetoslav Slavtchev" Date: Sat, 13 Dec 2003 21:33:08 +0000 Subject: Re: udev.rules.devfs + symlinks & a question Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Hi, > On Sat, Dec 13, 2003 at 02:17:22AM +0100, Svetoslav Slavtchev wrote: >=20 > > can a callout return several strings? > > NAME=3D"%c1", SYMLINK=3D"%c2 %c3" > >=20 > > no i don't think this can be done with a callout script >=20 > Try this patch if you like, to get special parts of the callout output. > This beast works now: > CALLOUT, BUS=3D"scsi", PROGRAM=3D"/bin/echo -n node link1 link2", ID=3D"n= ode *", > NAME=3D"%1c", SYMLINK=3D"%2c %3c" >=20 > The callout returned string is separated by spaces and is > addressed by the "len" value of the 'c' format char. > Since we support symlinks, this my be useful for other uses of callout > too. >=20 > good luck, > Kay thanks a lot, where could i find samples for callout scripts ? what information is available to the callout environment with other words how should i construct one :-) best, svetljo PS. current udev -bk is not rpm friendly the generation of udev.conf uses=20 a sed rule which conflicts with the=20 defaut rpm path for installing the binaries smth like $tmp/$name-$version-$release ^ ^ so this "-" break the "s-path-$udev_dir-" sed rule using ":" for delimiter fixes it also=20 make DESTDIR=3D.... EXTRAS=3D/extras/scsi_id install tryes to install scsi_id in "/sbin" not in DESTDIR =20 PS.2 i also made rpms from today's bk http://varna.demon.co.uk/~svetlio/cook/2.6/udev/ which reminds me to ask smth :-) what are the advantages/ disadvantages to compile using klibc ? >=20 >=20 > 02-get-part-of-callout-return-string.diff > introduce 'len number' for format chars > the first use is 'c'-the callout return to select a part of the output > string like: > CALLOUT, BUS=3D"scsi", PROGRAM=3D"/bin/echo -n node link1 link2", ID=3D= "node > *", NAME=3D"%1c", SYMLINK=3D"%2c %3c" > (note: first part is requested by len=3D1, len=3D0 will return the whole > string) > add a test to udev-test.pl >=20 --=20 +++ GMX - die erste Adresse f=FCr Mail, Message, More +++ Neu: Preissenkung f=FCr MMS und FreeMMS! http://www.gmx.net ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id371&op=3Dclick _______________________________________________ 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