Root/triggersad/files/triggerhappy.hotplug

1#!/bin/sh
2THD_SOCKET=/tmp/triggerhappy.socket
3[ -S "$THD_SOCKET" ] || exit
4
5case "$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    ;;
15esac
16

Archive Download this file



interactive