summaryrefslogtreecommitdiff
path: root/sys-apps/madcatz-mouse-restart/files/madcatz-rat6
blob: 3f5f94c8d007e0edaed989d0566ed75600de5c85 (plain)
1
2
3
4
5
6
7
8
9
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