C.3. hotplug & XFree supporting event devices: input.agent

/etc/hotplug/input.agent

#!/bin/bash

cd /etc/hotplug
. hotplug.functions
#DEBUG=yes export DEBUG

export ARG_SEP='\002'
export VAL_SEP='\003'

for dev in `ls /tmp/.X11-unix/ | grep evdev`; do {
    export dev="/tmp/.X11-unix/${dev}"
    /bin/sh -c 'echo -e "2.1${ARG_SEP}NAME${VAL_SEP}${NAME}${ARG_SEP}PHYS${VAL_SEP}${PHYS}${ARG_SEP}ACTION${VAL_SEP}${ACTION}" >> ${dev}' &
}; done

mirror server hosted at Truenetwork, Russian Federation.