Re: udev RUN+=: device but no partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Matthew Dharm                              Home: mdharm-usb@xxxxxxxxxxxxxxxxxx 
Maintainer, Linux USB Mass Storage Driver

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

Attachment: pgpqKnWcCXUvM.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux