From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Maksim (Max) Krasnyanskiy" Date: Fri, 19 Jul 2002 00:10:45 +0000 Subject: Support for multiple usermaps in hotplug usb.agent Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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