From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Dharm Date: Fri, 06 Jun 2008 00:04:55 +0000 Subject: Re: udev RUN+=: device but no partitions Message-Id: <20080606000455.GC19934@one-eyed-alien.net> MIME-Version: 1 Content-Type: multipart/mixed; boundary="S1BNGpv0yoYahz37" List-Id: References: <48486A19.1020909@indiana.edu> In-Reply-To: <48486A19.1020909@indiana.edu> To: linux-hotplug@vger.kernel.org --S1BNGpv0yoYahz37 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > 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 part= itions > on the device are not. >=20 > Example: usb thumbdrive that appears as sdb and has one partition sdb1. >=20 > Udev entry >=20 > KERNEL=3D=3D"sdb", RUN+=3D"/usr/local/sbin/check-sdb" >=20 > In check-sdb, if I run either "ls /dev/sdb*" or find /dev -name "sdb*", o= nly > /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. >=20 > My system is Ubuntu 8.04 (hardy) running udev-117-8. >=20 > Thanks, >=20 > Dick Repasky >=20 >=20 > - > -- > 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 --=20 Matthew Dharm Home: mdharm-usb@one-eyed-alien.= net=20 Maintainer, Linux USB Mass Storage Driver Way to go, lava boy. -- Stef to Greg User Friendly, 3/26/1998 --S1BNGpv0yoYahz37 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFISH8nHL9iwnUZqnkRAmY5AKCdThVSJxLx8uUvMzWgOOuIbVa3kwCfffSZ V5fLGSbI4hIeWHB2PQaa2ao= =ckqL -----END PGP SIGNATURE----- --S1BNGpv0yoYahz37--