summaryrefslogtreecommitdiffstats
path: root/usbdev
diff options
context:
space:
mode:
Diffstat (limited to 'usbdev')
-rwxr-xr-xusbdev17
1 files changed, 17 insertions, 0 deletions
diff --git a/usbdev b/usbdev
new file mode 100755
index 0000000..bea6bb5
--- /dev/null
+++ b/usbdev
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# try to load the proper driver for usb devices
+case "$ACTION" in
+ add|"")
+ for i in /sys/class/usb_device/$MDEV/device/*/modalias ; do
+ modprobe `cat $i` 2>/dev/null
+ done
+ ;;
+ remove)
+ for i in /sys/class/usb_device/$MDEV/device/*/modalias ; do
+ modprobe -r `cat $i` 2>/dev/null
+ done
+esac
+
+# we dont want the ugly usbdev[0-9].[0-9] dev.
+rm -f $MDEV