summaryrefslogtreecommitdiff
path: root/sys-apps/madcatz-mouse-restart/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/madcatz-mouse-restart/files')
-rwxr-xr-xsys-apps/madcatz-mouse-restart/files/madcatz-rat610
1 files changed, 10 insertions, 0 deletions
diff --git a/sys-apps/madcatz-mouse-restart/files/madcatz-rat6 b/sys-apps/madcatz-mouse-restart/files/madcatz-rat6
new file mode 100755
index 0000000..3f5f94c
--- /dev/null
+++ b/sys-apps/madcatz-mouse-restart/files/madcatz-rat6
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ "$1" = "post" ] && [ "$2" = "suspend" ]; then
+ for device in /sys/bus/usb/devices/*; do
+ [ "$(cat "$device/idVendor")" = "12cf" ] || continue
+ [ "$(cat "$device/idProduct")" = "0c04" ] || continue
+ echo 0 > "$device/authorized"
+ echo 1 > "$device/authorized"
+ done
+fi