linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG?] hotplug scripts launched 4 times
@ 2004-12-22 20:30 Wojtek Swiatek
  2004-12-22 20:35 ` Kay Sievers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wojtek Swiatek @ 2004-12-22 20:30 UTC (permalink / raw)
  To: linux-hotplug

Hello,

I am not sure this is the proper list for reporting possible bugs but I 
did not find anything better :)

The problem I have is that my agents scripts are launched 4 (for usbcam) 
or 2 (for USB pendrive) times - everytime. I looked though google trying 
to find someone with a similar issue but I seem to be the only one in 
the world with the issue (as usual :)).

System: Fedora Core 3 with latest patches/software versions. The 
/etc/hotplug/usb/usbcam script is very complicated:
#!/bin/bash
date >> /tmp/xxx

When plugging in I get 4 lines in /tmp/xxx

If this is a known issue (or if I do something terribly wrong) I would 
appreciate a cc: as I am not subscribed to the list.

Thank you,
Wojtek



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG?] hotplug scripts launched 4 times
  2004-12-22 20:30 [BUG?] hotplug scripts launched 4 times Wojtek Swiatek
@ 2004-12-22 20:35 ` Kay Sievers
  2004-12-22 20:40 ` Marco d'Itri
  2004-12-22 20:44 ` Wojtek Swiatek
  2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2004-12-22 20:35 UTC (permalink / raw)
  To: linux-hotplug

On Wed, 2004-12-22 at 21:30 +0100, Wojtek Swiatek wrote:
> Hello,
> 
> I am not sure this is the proper list for reporting possible bugs but I 
> did not find anything better :)
> 
> The problem I have is that my agents scripts are launched 4 (for usbcam) 
> or 2 (for USB pendrive) times - everytime. I looked though google trying 
> to find someone with a similar issue but I seem to be the only one in 
> the world with the issue (as usual :)).
> 
> System: Fedora Core 3 with latest patches/software versions. The 
> /etc/hotplug/usb/usbcam script is very complicated:
> #!/bin/bash
> date >> /tmp/xxx
> 
> When plugging in I get 4 lines in /tmp/xxx
> 
> If this is a known issue (or if I do something terribly wrong) I would 
> appreciate a cc: as I am not subscribed to the list.

Please log the env, or at least the DEVPATH from the environment, to see
what kernel devices are generating the events.

Kay



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG?] hotplug scripts launched 4 times
  2004-12-22 20:30 [BUG?] hotplug scripts launched 4 times Wojtek Swiatek
  2004-12-22 20:35 ` Kay Sievers
@ 2004-12-22 20:40 ` Marco d'Itri
  2004-12-22 20:44 ` Wojtek Swiatek
  2 siblings, 0 replies; 4+ messages in thread
From: Marco d'Itri @ 2004-12-22 20:40 UTC (permalink / raw)
  To: linux-hotplug

On Dec 22, Wojtek Swiatek <wojtek@swiatek.name> wrote:

> The problem I have is that my agents scripts are launched 4 (for usbcam) 
> or 2 (for USB pendrive) times - everytime. I looked though google trying 
> to find someone with a similar issue but I seem to be the only one in 
> the world with the issue (as usual :)).

From http://linux-hotplug.sourceforge.net/?selected=usb:

There are two kinds of usb hotplug event: device, and interface. Kernel
2.6 added device events, as well as reporting the complete set of
interface events. You can tell which kind of event by the environment
variables: device events don't include PRODUCT, or any of the other
parameters here except DEVPATH and ACTION. 

So:

# ignore device events
[ "$PRODUCT" ] || exit 0

-- 
ciao, |
Marco | [9988 anaVIqHsbuYXc]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG?] hotplug scripts launched 4 times
  2004-12-22 20:30 [BUG?] hotplug scripts launched 4 times Wojtek Swiatek
  2004-12-22 20:35 ` Kay Sievers
  2004-12-22 20:40 ` Marco d'Itri
@ 2004-12-22 20:44 ` Wojtek Swiatek
  2 siblings, 0 replies; 4+ messages in thread
From: Wojtek Swiatek @ 2004-12-22 20:44 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

Kay Sievers wrote:

>On Wed, 2004-12-22 at 21:30 +0100, Wojtek Swiatek wrote:
>  
>
>>Hello,
>>
>>I am not sure this is the proper list for reporting possible bugs but I 
>>did not find anything better :)
>>
>>The problem I have is that my agents scripts are launched 4 (for usbcam) 
>>or 2 (for USB pendrive) times - everytime. I looked though google trying 
>>to find someone with a similar issue but I seem to be the only one in 
>>the world with the issue (as usual :)).
>>
>>System: Fedora Core 3 with latest patches/software versions. The 
>>/etc/hotplug/usb/usbcam script is very complicated:
>>#!/bin/bash
>>date >> /tmp/xxx
>>
>>When plugging in I get 4 lines in /tmp/xxx
>>
>>If this is a known issue (or if I do something terribly wrong) I would 
>>appreciate a cc: as I am not subscribed to the list.
>>    
>>
>
>Please log the env, or at least the DEVPATH from the environment, to see
>what kernel devices are generating the events.
>
>Kay
>
>  
>
Thank you for your email. I added env >> /tmp/xxx to the script above 
and the result is attached.

Best regards,
Wojtek


[-- Attachment #2: xxx.txt --]
[-- Type: text/plain, Size: 1344 bytes --]

Wed Dec 22 21:39:02 CET 2004
DEVPATH=/devices/pci0000:00/0000:00:1f.2/usb1/1-1/1-1:1.0
REMOVER=/var/run/usb/%sys%%devices%pci0000:00%0000:00:1f.2%usb1%1-1%1-1:1.0
PATH=/bin:/sbin:/usr/sbin:/usr/bin
ACTION=add
PWD=/etc/hotplug
HOME=/
SHLVL=3
DEVICE=/proc/bus/usb/001/042
INTERFACE=6/1/1
PRODUCT=4a9/309a/1
TYPE=usb
SEQNUM=602
_=/bin/env
Wed Dec 22 21:39:02 CET 2004
DEVPATH=/devices/pci0000:00/0000:00:1f.2/usb1/1-1/1-1:1.0
REMOVER=/var/run/usb/%sys%%devices%pci0000:00%0000:00:1f.2%usb1%1-1%1-1:1.0
PATH=/bin:/sbin:/usr/sbin:/usr/bin
ACTION=add
PWD=/etc/hotplug
HOME=/
SHLVL=3
DEVICE=/proc/bus/usb/001/042
INTERFACE=6/1/1
PRODUCT=4a9/309a/1
TYPE=usb
SEQNUM=602
_=/bin/env
Wed Dec 22 21:39:02 CET 2004
DEVPATH=/devices/pci0000:00/0000:00:1f.2/usb1/1-1/1-1:1.0
REMOVER=/var/run/usb/%sys%%devices%pci0000:00%0000:00:1f.2%usb1%1-1%1-1:1.0
PATH=/bin:/sbin:/usr/sbin:/usr/bin
ACTION=add
PWD=/etc/hotplug
HOME=/
SHLVL=3
DEVICE=/proc/bus/usb/001/042
INTERFACE=6/1/1
PRODUCT=4a9/309a/1
TYPE=usb
SEQNUM=602
_=/bin/env
Wed Dec 22 21:39:03 CET 2004
DEVPATH=/devices/pci0000:00/0000:00:1f.2/usb1/1-1/1-1:1.0
REMOVER=/var/run/usb/%sys%%devices%pci0000:00%0000:00:1f.2%usb1%1-1%1-1:1.0
PATH=/bin:/sbin:/usr/sbin:/usr/bin
ACTION=add
PWD=/etc/hotplug
HOME=/
SHLVL=3
DEVICE=/proc/bus/usb/001/042
INTERFACE=6/1/1
PRODUCT=4a9/309a/1
TYPE=usb
SEQNUM=602
_=/bin/env

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-12-22 20:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-22 20:30 [BUG?] hotplug scripts launched 4 times Wojtek Swiatek
2004-12-22 20:35 ` Kay Sievers
2004-12-22 20:40 ` Marco d'Itri
2004-12-22 20:44 ` Wojtek Swiatek

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).