From: Ian Pilcher <i.pilcher@comcast.net>
To: linux-hotplug@vger.kernel.org
Subject: BUG: REMOVER not called for USB unplug
Date: Sun, 06 Jun 2004 17:04:38 +0000 [thread overview]
Message-ID: <40C34EA6.2080106@comcast.net> (raw)
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 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
reply other threads:[~2004-06-06 17:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=40C34EA6.2080106@comcast.net \
--to=i.pilcher@comcast.net \
--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).