packages/utils/triggerhappy/files/triggerhappy.hotplug
mirko aa23d11176 Triggerhappy is a lightweight hotkey daemon that
can launch arbitrary commands on input events.
It supports the hotplugging of devices and the
processing of key combinations.

Thanks to Stefan Tomanek!

git-svn-id: svn://svn.openwrt.org/openwrt/packages@24018 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-17 12:09:45 +00:00

16 lines
297 B
Bash

#!/bin/sh
THD_SOCKET=/tmp/triggerhappy.socket
[ -S "$THD_SOCKET" ] || exit
case "$ACTION" in
add)
DEVICE="/dev/$DEVNAME"
[ -c "$DEVICE" ] || exit
# offer device to triggerhappy daemon
/usr/sbin/th-cmd --socket "$THD_SOCKET" --add "$DEVICE"
;;
remove)
# nothing to do
;;
esac