From: "Maksim (Max) Krasnyanskiy" <maxk@qualcomm.com>
To: linux-hotplug@vger.kernel.org
Subject: Support for multiple usermaps in hotplug usb.agent
Date: Fri, 19 Jul 2002 00:10:45 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-102703767903147@msgid-missing> (raw)
Hi Ukai,
We were discussing my proposal to introduce support for multiple usermaps
in usb.agent
on linux-hotplug-devel mailing list. David Brownell had a concern that my
solution
is different from Debian and therefor may introduce some problems.
So I'd like to get your opinion, as a Debian hotplug maintainer, on that.
Here is my patch for hotplug 2002.04.01
--- usb.agent.orig Thu Jul 18 01:03:23 2002
+++ usb.agent Thu Jul 18 04:53:02 2002
@@ -82,8 +82,7 @@
# config scripts (which mustn't overlap with kernel modules). Those
# could change $DEVICE permissions, etc.
#
-MAP_USERMAP=$HOTPLUG_DIR/usb.usermap
-
+MAP_USERMAP_DIR=$HOTPLUG_DIR/usb
# accumulates list of modules we may care about
DRIVERS=""
@@ -335,13 +334,17 @@
fi
# some devices have user-mode drivers (no kernel module, but config)
- # or specialized user-mode setup helpers
- if [ -r $MAP_USERMAP ]; then
+ # or specialized user-mode setup helpers
+ MAPS="$HOTPLUG_DIR/*.usermap $MAP_USERMAP_DIR/*.usermap"
+ if [ "$MAPS" != "" ]; then
MODPROBE=:
- load_drivers usb $MAP_USERMAP "$LABEL"
- if [ "$DRIVERS" != "" ]; then
- FOUND=true
- fi
+ for map in $MAPS; do
+ load_drivers usb $map "$LABEL"
+ if [ "$DRIVERS" != "" ]; then
+ FOUND=true
+ break
+ fi
+ done
fi
if [ "$FOUND" = "false" ]; then
---
Basically the idea is simple. Packages/subsystems simply install their own
XXX.usermap
into /etc/hotplug/usb. And usb.agent processes them in addition to original
usb.usermap.
It seems to be simpler than what Debian does right now. ie generating new
usb.usermap
whenever something gets installed or uninstalled.
Comments ?
Max
http://bluez.sf.net
http://vtun.sf.net
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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
next reply other threads:[~2002-07-19 0:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-19 0:10 Maksim (Max) Krasnyanskiy [this message]
2002-07-21 13:57 ` Support for multiple usermaps in hotplug usb.agent Maksim (Max) Krasnyanskiy
2002-07-21 13:58 ` Maksim (Max) Krasnyanskiy
2002-07-21 17:26 ` Fumitoshi UKAI
2002-07-21 17:54 ` Johannes Erdfelt
2002-07-22 4:55 ` David Brownell
2002-07-22 22:03 ` Maksim (Max) Krasnyanskiy
2002-07-24 1:34 ` David Brownell
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=marc-linux-hotplug-102703767903147@msgid-missing \
--to=maxk@qualcomm.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).