From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: Script is called multiple times
Date: Tue, 17 May 2005 13:09:29 +0000 [thread overview]
Message-ID: <4289ED09.1010900@ums.usu.ru> (raw)
In-Reply-To: <200505171448.53645.rob.draaijer@ti-wmc.nl>
Rob Draaijer wrote:
>Hi guys,
>
>I encountering a weird problem using hotplug. My script to automatically mount
>a mass storage device and start some services is always called two times
>(with the same environment variables). Does anyone how to resolve this?
>
>Regards,
>
>Rob Draaijer
>
>Environment variables during execution:
>
>DEVFS=/proc/bus/usb
>REMOVER=/var/run/usb/%proc%bus%usb%001%012
>PATH=/bin:/sbin:/usr/sbin:/usr/bin
>ACTIONd
>PWD=/etc/hotplug
>HOME=/
>SHLVL=3
>DEVICE=/proc/bus/usb/001/012
>INTERFACE=8/6/80
>PRODUCT×d/1620/100
>TYPE=usb
>_=/usr/bin/env
>
>Part of usb.usermap:
>
>usb-storage 0x000f 0x03ee 0x0000 0x0000 0x0245 0x00
>0x00 0x00 0x00 0x00 0x00
>0x00000000
>usb-storage 0x000f 0x03f0 0x0107 0x0200 0x0200 0x00
>0x00 0x00 0x00 0x00 0x00
>0x00000000
>usb-storage 0x000f 0x04e6 0x0001 0x0200 0x0200 0x00
>0x00 0x00 0x00 0x00 0x00
>0x00000000
>..... .... .....
>
>
I suppose you just want to make usb.usermap an empty file. But anyway,
even if you do that, in the cold-plugging scenario with modular USB
drivers your script will be called twice (once for the synthetic hotplug
event and once for the real one), so you just have to be prepared to see
duplicates.
--
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\x16344&op=click
_______________________________________________
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
next prev parent reply other threads:[~2005-05-17 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-17 12:48 Script is called multiple times Rob Draaijer
2005-05-17 13:09 ` Alexander E. Patrakov [this message]
2005-05-17 13:30 ` Kay Sievers
2005-05-17 14:33 ` Rob Draaijer
2005-05-18 12:43 ` Kay Sievers
2005-05-19 7:31 ` Rob Draaijer
2005-05-19 7:39 ` Kay Sievers
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=4289ED09.1010900@ums.usu.ru \
--to=patrakov@ums.usu.ru \
--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).