From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Patterson Date: Wed, 06 Oct 2004 18:42:19 +0000 Subject: Re: Problems using scsi_id with udevstart Message-Id: <1097088139.8733.17.camel@bluto.andrew> MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-yLHQ5veOv7O3jOJHjus2" List-Id: References: <1097019226.2300.38.camel@bluto.andrew> In-Reply-To: <1097019226.2300.38.camel@bluto.andrew> To: linux-hotplug@vger.kernel.org --=-yLHQ5veOv7O3jOJHjus2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2004-10-06 at 09:59 -0700, Patrick Mansfield wrote: > On Wed, Oct 06, 2004 at 10:26:13AM -0600, Andrew Patterson wrote: >=20 > > Note: here is the error you get when scsi_id is run without any > > parameters: > >=20 > > # /sbin/scsi_id > > -s must be specified >=20 > For the udev PROGRAM rules with no arguments, it is effectively invoked > like this (well there are other environment values but scsi_id only cares > about DEVPATH): >=20 > DEVPATH=3D/block/sda /sbin/scsi_id block >=20 This is what I thought was supposed to happen. I printed out the arguments and the environment when scsi_id was invoked through udevstart. No arguments were passed and UDEVPATH was always set to /class/net/lo for every path in /sys. Note that DEVNAME does seem to be set correctly. Example: DEVNAME=3D/dev/sda DEVPATH=3D/class/net/lo > Since udev does not have a % whatever for the DEVPATH, you can't pass it > in the rule file, that is this rule would not work for anything but sda: >=20 > PROGRAM=3D"/sbin/scsi_id -s /block/sda" >=20 > You would need a new udev %-something, like: >=20 > PROGRAM=3D"/sbin/scsi_id -s %p" Yeah, I was hoping for something like the %p. Seems like it would be nice to have one in any case. However, I think udevstart should just work like using plain /sbin/scsi_id. That way, you don't have to have a separate rules for udev and udevstart (if this is even possible). I am still not sure if I am running into a bug, or that I just don't understand how udevstart is supposed to work. My goal is to be able to just plug in arbitrary SCSI devices and not have to worry about human- readable device files being created. From the sample scripts I have seen, the current method is to plug in your device, then run some script (like gen_scsi_id_udev_rules.sh that comes with scsi_id) that generates udev rules for you, which you must then hand add to the udev rulesets. If udevstart worked like I hoped it would, you could just edit /etc/scsi_id.conf to account for bad devices that need special handling. Andrew >=20 > -- Patrick Mansfield >=20 --=20 Andrew Patterson =20 Hewlett-Packard --=-yLHQ5veOv7O3jOJHjus2 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBZDyLoKXgdXvblSgRAh5FAJwNVtGGWTmOC/vfTYUNjv/RuBPuuACeNI2a NFPO2O5eKBXPPcNwHhUSZ8U= =DQSX -----END PGP SIGNATURE----- --=-yLHQ5veOv7O3jOJHjus2-- ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ 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