Triggerhappy is a lightweight hotkey daemon that
[openwrt/svn-archive/archive.git] / utils / triggerhappy / files / triggerhappy.hotplug
1 #!/bin/sh
2 THD_SOCKET=/tmp/triggerhappy.socket
3 [ -S "$THD_SOCKET" ] || exit
4
5 case "$ACTION" in
6 add)
7 DEVICE="/dev/$DEVNAME"
8 [ -c "$DEVICE" ] || exit
9 # offer device to triggerhappy daemon
10 /usr/sbin/th-cmd --socket "$THD_SOCKET" --add "$DEVICE"
11 ;;
12 remove)
13 # nothing to do
14 ;;
15 esac