From: Andrey Borzenkov Date: Thu, 07 Jun 2007 03:38:24 +0000 Subject: Re: udev remove ATTR(S) not working Message-Id: <200706070738.33444.arvidjaar@mail.ru> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1114150178==" List-Id: References: <46673B9D.3000205@bppiac.hu> In-Reply-To: <46673B9D.3000205@bppiac.hu> To: linux-hotplug@vger.kernel.org --===============1114150178== Content-Type: multipart/signed; boundary="nextPart1393786.GAXTLRCoDo"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1393786.GAXTLRCoDo Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > On 6/7/07, Farkas Levente wrote: > > hi, > > how can i write a RUN udev rules for remove event? i want to recognize > > my usd pendrive's add and remove. the add is simple since i can use > > rather specific rules like: > > --------------------------------------- > > ACTION=3D=3D"add", SUBSYSTEM=3D=3D"block", ATTR{size}=3D=3D"2880", > > ATTRS{serial}=3D=3D"07530736300A", ATTRS{product}=3D=3D"USB DISK Pro", > > RUN+=3D"/xxx" --------------------------------------- > > but the remove rule is much complicated, since (at least it seems for > > me) udev don't send ATTR(S) in this case and don't know about anymore > > the removed device parameters. > If you absolutely need them on remove (could you explain why? What exactly = are=20 you trying to do?), set environment vars on add and use (match) them on=20 remove.=20 =2Dandrey --nextPart1393786.GAXTLRCoDo Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGZ32xR6LMutpd94wRArt0AKCBokWFVJlA+twIP7EmDbRrXFRJNACfUaAa 4Z4s4uvFdCMcP/fzOKJx8Pg= =4c+c -----END PGP SIGNATURE----- --nextPart1393786.GAXTLRCoDo-- --===============1114150178== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --===============1114150178== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1114150178==--