Fix pcsensor.sh to check if hid driver is loaded

This commit is contained in:
shakemid 2017-08-31 09:41:03 +09:00
parent 45e7e47657
commit 380f242cc1

View file

@ -10,6 +10,12 @@ moduleid=$( modinfo | awk '$6 == "hid" { print $1 }' )
cd "$( dirname "$0" )" || exit 1 cd "$( dirname "$0" )" || exit 1
modunload -i "$moduleid" if [ -n "$moduleid" ]; then
modunload -i "$moduleid"
fi
./pcsensor "$@" ./pcsensor "$@"
modload "$hiddriver"
if [ -n "$moduleid" ]; then
modload "$hiddriver"
fi