290e852b40bc678c5dcc275f3995e840e9ce2744
[reset-trackpoint-fix.git] / reset-trackpoint-fix.sh
1 #!/bin/sh
2
3 . /etc/reset-trackpoint-fix.conf
4
5 if [ -z "${DEVICE}" ]; then
6   echo "*** No Trackpoint SerIO device specifed. Do nothing."
7   exit 1
8 fi
9
10 for mode in none reconnect; do
11   echo "- Put ${DEVICE} to '${mode}' state"
12   echo -n ${mode} > /sys/bus/serio/devices/${DEVICE}/drvctl
13 done