summaryrefslogtreecommitdiff
path: root/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap')
-rwxr-xr-x[-rw-r--r--]packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap37
1 files changed, 37 insertions, 0 deletions
diff --git a/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap b/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap
index e69de29bb2..d09e1176ec 100644..100755
--- a/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap
+++ b/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap
@@ -0,0 +1,37 @@
+#!/bin/sh -e
+# update-usb.usermap
+# Copyright (c) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
+# GPL
+
+LIBDIR=/usr/lib/hotplug
+USERMAP=/etc/hotplug/usb.usermap
+LOCALMAP=/etc/hotplug/usb.usermap.local
+
+test -d $LIBDIR || exit 0
+
+echo -n "Updating $USERMAP ..."
+
+echo "# usb.usermap file" > $USERMAP
+echo "# This is autogenerated by update-usb.usermap program" >> $USERMAP
+echo "# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info" >> $USERMAP
+
+if [ -f $LOCALMAP ]; then
+ echo "# usb.usermap.local" >> $USERMAP
+ cat $LOCALMAP >> $USERMAP
+fi
+
+cd $LIBDIR
+for package in *
+do
+ if [ -d "$package" ]; then
+ map=$package/usb.usermap
+ echo "# $package" >> $USERMAP
+ if [ -x "$map" ]; then
+ ./$map >> $USERMAP
+ elif [ -f "$map" ]; then
+ cat $map >> $USERMAP
+ fi
+ fi
+done
+
+echo done.