aboutsummaryrefslogtreecommitdiff
path: root/hotplug
diff options
context:
space:
mode:
authorgermeier <germeier>2004-04-19 12:22:51 +0000
committergermeier <germeier>2004-04-19 12:22:51 +0000
commit040a298c38ee280b757842e2cb2d16fe4532267e (patch)
tree5d1e0cb2c94644b9c66aab7f1ed49a3835d691c9 /hotplug
parent8239e1579a40a1355a74ba911a9db1d6d7405bfe (diff)
downloadmpiosh-040a298c38ee280b757842e2cb2d16fe4532267e.tar.gz
mpiosh-040a298c38ee280b757842e2cb2d16fe4532267e.tar.bz2
mpiosh-040a298c38ee280b757842e2cb2d16fe4532267e.zip
oops, really add the hotpluging files to the repository ;-)
Diffstat (limited to 'hotplug')
-rw-r--r--hotplug/Makefile.am7
-rwxr-xr-xhotplug/libmpio.in20
-rw-r--r--hotplug/libmpio.usermap5
3 files changed, 32 insertions, 0 deletions
diff --git a/hotplug/Makefile.am b/hotplug/Makefile.am
new file mode 100644
index 0000000..f9e122e
--- /dev/null
+++ b/hotplug/Makefile.am
@@ -0,0 +1,7 @@
+datadir=/etc/hotplug/usb
+sbindir=/etc/hotplug/usb
+
+data_DATA = libmpio.usermap
+sbin_SCRIPTS = libmpio
+EXTRA_DIST = libmpio libmpio.usermap
+
diff --git a/hotplug/libmpio.in b/hotplug/libmpio.in
new file mode 100755
index 0000000..27c5370
--- /dev/null
+++ b/hotplug/libmpio.in
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# /etc/hotplug/usb/libmpio
+#
+# Fix permissions on device file, so
+# "normal" users can access the MPIO player
+
+MPIO_USER=@MPIOUSER@
+MPIO_GROUP=@MPIOGROUP@
+MPIO_PERM=@MPIOPERM@
+
+if [ "$ACTION" = "add" ] &&
+ [ "$TYPE" = "usb" ] &&
+ [ -f "${DEVICE}" ]
+then
+ chmod 0000 "$DEVICE"
+ chown $MPIO_USER "$DEVICE"
+ chgrp $MPIO_GROUP "$DEVICE"
+ chmod $MPIO_PERM "$DEVICE"
+fi
diff --git a/hotplug/libmpio.usermap b/hotplug/libmpio.usermap
new file mode 100644
index 0000000..a73ca0e
--- /dev/null
+++ b/hotplug/libmpio.usermap
@@ -0,0 +1,5 @@
+# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
+# all MPIO players:
+libmpio 0x0003 0x2735 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+# Virgin Pulse branded MPIO players:
+libmpio 0x0003 0x2735 0x0071 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000