linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Support for multiple usermaps in hotplug usb.agent
@ 2002-07-19  0:10 Maksim (Max) Krasnyanskiy
  2002-07-21 13:57 ` Maksim (Max)  Krasnyanskiy
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Maksim (Max) Krasnyanskiy @ 2002-07-19  0:10 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-07-24  1:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-19  0:10 Support for multiple usermaps in hotplug usb.agent Maksim (Max) Krasnyanskiy
2002-07-21 13:57 ` 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

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).