From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alexander E. Patrakov" Date: Tue, 17 May 2005 13:09:29 +0000 Subject: Re: Script is called multiple times Message-Id: <4289ED09.1010900@ums.usu.ru> List-Id: References: <200505171448.53645.rob.draaijer@ti-wmc.nl> In-Reply-To: <200505171448.53645.rob.draaijer@ti-wmc.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Rob Draaijer wrote: >Hi guys, > >I encountering a weird problem using hotplug. My script to automatically m= ount=20 >a mass storage device and start some services is always called two times=20 >(with the same environment variables). Does anyone how to resolve this? > >Regards,=20 > >Rob Draaijer > >Environment variables during execution: > >DEVFS=3D/proc/bus/usb >REMOVER=3D/var/run/usb/%proc%bus%usb%001%012 >PATH=3D/bin:/sbin:/usr/sbin:/usr/bin >ACTION=ADd >PWD=3D/etc/hotplug >HOME=3D/ >SHLVL=3D3 >DEVICE=3D/proc/bus/usb/001/012 >INTERFACE=3D8/6/80 >PRODUCT=D7d/1620/100 >TYPE=3Dusb >_=3D/usr/bin/env > >Part of usb.usermap: > >usb-storage 0x000f 0x03ee 0x0000 0x0000 0x0245 0= x00 =20 >0x00 0x00 0x00 0x00 0x00 = =20 >0x00000000 >usb-storage 0x000f 0x03f0 0x0107 0x0200 0x0200 0= x00 =20 >0x00 0x00 0x00 0x00 0x00 = =20 >0x00000000 >usb-storage 0x000f 0x04e6 0x0001 0x0200 0x0200 0= x00 =20 >0x00 0x00 0x00 0x00 0x00 = =20 >0x00000000 >..... .... ..... > =20 > I suppose you just want to make usb.usermap an empty file. But anyway,=20 even if you do that, in the cold-plugging scenario with modular USB=20 drivers your script will be called twice (once for the synthetic hotplug=20 event and once for the real one), so you just have to be prepared to see=20 duplicates. --=20 Alexander E. Patrakov ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_idt12&alloc_id=16344&op=3Dclick _______________________________________________ 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