linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev RUN+=: device but no partitions
Date: Fri, 06 Jun 2008 00:04:55 +0000	[thread overview]
Message-ID: <20080606000455.GC19934@one-eyed-alien.net> (raw)
In-Reply-To: <48486A19.1020909@indiana.edu>

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

I wonder if this could be a timing problem.  The disk is discovered before
it's partitions are discovered... if your script gets called in that time
window between the two, you would get the results you describe.

Matt

On Thu, Jun 05, 2008 at 06:35:05PM -0400, Dick Repasky wrote:
> 
> If I use udev to run a script when a usb disk device appears, the device file
> for the whole device is available in the script but device files for partitions
> on the device are not.
> 
> Example: usb thumbdrive that appears as sdb and has one partition sdb1.
> 
> Udev entry
> 
> KERNEL=="sdb", RUN+="/usr/local/sbin/check-sdb"
> 
> In check-sdb, if I run either "ls /dev/sdb*" or find /dev -name "sdb*", only
> /dev/sdb appears but not /dev/sdb1.  Is that behavior correct?  When the same
> script is run from the command-line, the partition device file appears.
> 
> My system is Ubuntu 8.04 (hardy) running udev-117-8.
> 
> Thanks,
> 
> Dick Repasky
> 
> 
> -
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

Way to go, lava boy.
					-- Stef to Greg
User Friendly, 3/26/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-06-06  0:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 22:35 udev RUN+=: device but no partitions Dick Repasky
2008-06-06  0:04 ` Matthew Dharm [this message]
2008-06-06  6:12 ` Kay Sievers
2008-06-06 11:06 ` Dick Repasky

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=20080606000455.GC19934@one-eyed-alien.net \
    --to=mdharm-usb@one-eyed-alien.net \
    --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).