* Is anybody paying attention?
@ 2004-11-11 18:02 Ian Pilcher
2004-11-11 19:20 ` the flying pig brigade
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ian Pilcher @ 2004-11-11 18:02 UTC (permalink / raw)
To: linux-hotplug
Come on people! This is causing a lot of pain for people who want USB
devices to "just work". If changing the "readlink -f" call to just
"readlink" isn't the right answer, then someone speak up. Otherwise,
fix it!
Ian Pilcher wrote:
> This seems pretty straightforward to me. Is there some reason that no
> one has responded?
>
> -------- Original Message --------
> Subject: BUG: REMOVER not called for USB unplug
> Date: Sun, 06 Jun 2004 12:04:38 -0500
> From: Ian Pilcher <i.pilcher@comcast.net>
> To: linux-hotplug-devel@lists.sourceforge.net
>
> This is a follow-up to the "Run script when USB scanner unplugged"
> thread. I think I have figured out why the REMOVER script is never
> called when I unplug my USB scanner.
>
> I believe that the problem is the following part of
> /etc/hotplug/usb.agent:
>
> #
> # declare a REMOVER name that the add action can use to create a
> # remover, or that the remove action can use to execute a remover.
> #
> if [ "$DEVPATH" != "" ]; then
> # probably, 2.6.x
> REMOVER=/var/run/usb/$(readlink -f $SYSFS/$DEVPATH | sed -e 's;/;%;g')
> elif [ "$DEVICE" != "" ]; then
> # 2.4.x?
> REMOVER=/var/run/usb/$(echo $DEVICE | sed -e 's;/;%;g')
> else
> # should not happen?
> REMOVER=/var/run/usb/$(echo "$INTERFACE/$PRODUCT/$TYPE" | sed -e
> 's;/;%;g')
> fi
> export REMOVER
>
> Note that if DEVPATH is set, then the sysfs entry is used to determine
> the value of REMOVER. But this entry is already gone when the script is
> executed.
>
> Could the call to readlink -f be removed?
>
--
====================================
Ian Pilcher i.pilcher@comcast.net
====================================
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Is anybody paying attention?
2004-11-11 18:02 Is anybody paying attention? Ian Pilcher
@ 2004-11-11 19:20 ` the flying pig brigade
2004-11-11 21:00 ` Ian Pilcher
2004-11-12 2:06 ` Mike Frysinger
2 siblings, 0 replies; 4+ messages in thread
From: the flying pig brigade @ 2004-11-11 19:20 UTC (permalink / raw)
To: linux-hotplug
On Thu, Nov 11, 2004 at 12:02:40PM -0600, Ian Pilcher wrote:
> Come on people! This is causing a lot of pain for people who want USB
> devices to "just work". If changing the "readlink -f" call to just
> "readlink" isn't the right answer, then someone speak up. Otherwise,
> fix it!
Your complaint has been noted and filed away in the little box that
contain all such unwarranted, unprovoked, and unneeded flames. Items in
the box will be answered in the order in which they were received, with
the proper amount of time elapsing between each, depending on the
validity of the request.
In order to speed up further requests, a valid patch should be included
in your response.
Thank you for your time. This was an automated response.
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is anybody paying attention?
2004-11-11 18:02 Is anybody paying attention? Ian Pilcher
2004-11-11 19:20 ` the flying pig brigade
@ 2004-11-11 21:00 ` Ian Pilcher
2004-11-12 2:06 ` Mike Frysinger
2 siblings, 0 replies; 4+ messages in thread
From: Ian Pilcher @ 2004-11-11 21:00 UTC (permalink / raw)
To: linux-hotplug
Ian Pilcher wrote:
> Come on people! This is causing a lot of pain for people who want USB
> devices to "just work". If changing the "readlink -f" call to just
> "readlink" isn't the right answer, then someone speak up. Otherwise,
> fix it!
>
An update, changing 'readlink -f' to simply 'readlink' definitely
doesn't work. Replacing it with 'echo' *seems* to work for me. I don't
feel comfortable sending in a patch to do this, because I don't under-
stand what side-effects it might have.
To ask again, I'm proposing to change the line in /etc/hotplug/usb.agent
that reads:
REMOVER=/var/run/usb/$(readlink -f $SYSFS/$DEVPATH | sed -e 's;/;%;g')
to:
REMOVER=/var/run/usb/$(echo -n $SYSFS/$DEVPATH | sed -e 's;/;%;g')
This gives REMOVER a consistent value for both add and insert events
(even when the sysfs device is already gone during the remove event).
--
====================================
Ian Pilcher i.pilcher@comcast.net
====================================
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is anybody paying attention?
2004-11-11 18:02 Is anybody paying attention? Ian Pilcher
2004-11-11 19:20 ` the flying pig brigade
2004-11-11 21:00 ` Ian Pilcher
@ 2004-11-12 2:06 ` Mike Frysinger
2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2004-11-12 2:06 UTC (permalink / raw)
To: linux-hotplug
On Thursday 11 November 2004 02:20 pm, the flying pig brigade wrote:
> In order to speed up further requests, a valid patch should be included
> in your response.
althought it can be labeled as 'annoying' and 'provoking in an asshat manner',
the description was more than sufficient to describe what is needed to 'fix'
the proposed 'bug'
sed -i 's:readlink -f:readlink:g' $(grep -rl 'readlink -f' *)
i'm not saying that's the correct fix (hell i dont even know what the bug is),
but replying in such a manner isnt exactly helpful either :P
-mike
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-12 2:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-11 18:02 Is anybody paying attention? Ian Pilcher
2004-11-11 19:20 ` the flying pig brigade
2004-11-11 21:00 ` Ian Pilcher
2004-11-12 2:06 ` Mike Frysinger
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).