linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Patterson <andrew.patterson@hp.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Problems using scsi_id with udevstart
Date: Wed, 06 Oct 2004 18:42:19 +0000	[thread overview]
Message-ID: <1097088139.8733.17.camel@bluto.andrew> (raw)
In-Reply-To: <1097019226.2300.38.camel@bluto.andrew>

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]

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:
> 
> > Note: here is the error you get when scsi_id is run without any
> > parameters:
> > 
> > # /sbin/scsi_id
> > -s must be specified
> 
> 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):
> 
> DEVPATH=/block/sda /sbin/scsi_id block
> 

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=/dev/sda
DEVPATH=/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:
> 
> 	PROGRAM="/sbin/scsi_id -s /block/sda"
> 
> You would need a new udev %-something, like:
> 
> 	PROGRAM="/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

> 
> -- Patrick Mansfield
> 
-- 
Andrew Patterson                
Hewlett-Packard

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-10-06 18:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 23:33 Problems using scsi_id with udevstart Andrew Patterson
2004-10-05 23:53 ` Patrick Mansfield
2004-10-05 23:55 ` Kay Sievers
2004-10-06 16:20 ` Andrew Patterson
2004-10-06 16:26 ` Andrew Patterson
2004-10-06 16:44 ` Kay Sievers
2004-10-06 16:59 ` Patrick Mansfield
2004-10-06 17:33 ` Andrew Patterson
2004-10-06 18:07 ` Kay Sievers
2004-10-06 18:42 ` Andrew Patterson [this message]
2004-10-06 19:13 ` Kay Sievers
2004-10-06 21:22 ` Andrew Patterson
2004-10-06 21:39 ` Kay Sievers
2004-10-06 22:24 ` Greg KH
2004-10-06 22:28 ` Andrew Patterson
2004-10-06 23:08 ` Kay Sievers
2004-10-06 23:19 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1097088139.8733.17.camel@bluto.andrew \
    --to=andrew.patterson@hp.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).