From: Chris Clayton <chris2553@googlemail.com>
To: linux-hotplug@vger.kernel.org
Subject: Regression in udev-139?
Date: Sat, 28 Feb 2009 09:15:13 +0000 [thread overview]
Message-ID: <200902280915.13187.chris2553@googlemail.com> (raw)
Hi,
Please cc me on any reply - I'm not subscribed.
I have a script that is run via udev whenever a usb storage device is plugged in
to my computer - all it does is place an icon on the desktop. A similar script
hides the icon again when the device is unplugged. OK, it's not sophisticated,
but it does the job.
I've been using the scripts for maybe two years or so without problem, but
yesterday I built and installed udev-139 and they stopped working. Enabling a
bit of debugging in the scripts shows that with udev-139 the ID_BUS environment
variable is no longer being passed down when the scripts are run.
The showicon script is as follows:
#!/bin/sh
#SEQ=$RANDOM
#/usr/bin/logger "Starting environment dump : id is $SEQ"
#/usr/bin/env | while read v; do
# /usr/bin/logger "$SEQ: $v"
#done
#/usr/bin/logger "environment dump $SEQ complete"
#/usr/bin/logger "udevshowicon: starting to get icon name"
#/usr/bin/logger "udevshowicon: ACTION is \"$ACTION\""
#/usr/bin/logger "udevshowicon: SUBSYSTEM is \"$SUBSYSTEM\""
#/usr/bin/logger "udevshowicon: DEVTYPE is \"$DEVTYPE\""
#/usr/bin/logger "udevshowicon: ID_FS_VERSION is \"$ID_FS_VERSION\""
#/usr/bin/logger "udevshowicon: ID_FS_TYPE is \"$ID_FS_TYPE\""
#/usr/bin/logger "udevshowicon: ID_BUS is \"$ID_BUS\""
# belt and braces sanity checks ...
[ "$ACTION" = "add" ] || exit 1
[ "$SUBSYSTEM" = "block" ] || exit 1
[ "$DEVTYPE" = "partition" ] || exit 1
[ -z "$ID_FS_VERSION" ] && exit 1
[ -z "$ID_FS_TYPE" ] && exit 1
# The following breaks from udev-139...
#[ "$ID_BUS" = "usb" ] || exit 1
# ...so do this instead
if ! echo $DEVPATH | grep -q usb; then
exit 1
fi
ICON=`echo $DEVLINKS | cut -f1 -d' '`
ICON=`echo $ICON | cut -f3 -d'/'`
#/usr/bin/logger "udevshowicon: about to show $ICON"
[ -e /home/users/chris/Desktop/.$ICON ] && \
/usr/bin/mv /home/users/chris/Desktop/.$ICON /home/users/chris/Desktop/$ICON
Is this an intentional change or a regression, please? The changelog entries are
too cryptic for me to work out whether one of them is saying that ID_BUS is no
longer provided on usb {,un}plug events. Happy to provide aditional information
or test patches,
Regards
Chris
--
In a world without walls and fences, who needs windows and gates?.
next reply other threads:[~2009-02-28 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-28 9:15 Chris Clayton [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-03-01 15:49 Regression in udev-139? 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=200902280915.13187.chris2553@googlemail.com \
--to=chris2553@googlemail.com \
--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).