[Fwd: BUG: REMOVER not called for USB unplug]
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 <[email protected]>
To: [email protected]
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?
Signature · 20 lines
==================================== Ian Pilcher [email protected] ==================================== -- ==================================== Ian Pilcher [email protected] ==================================== ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel