pcsensor-temper/pcsensor.sh

16 lines
352 B
Bash
Raw Normal View History

#!/bin/bash
# pcsensor wrapper for Solaris
# libusb_detach_kernel_driver does not seem to work on Solaris.
# Thus, it looks necessary to unload hid driver manually.
hiddriver=/kernel/drv/amd64/hid
moduleid=$( modinfo | awk '$6 == "hid" { print $1 }' )
cd "$( dirname "$0" )" || exit 1
modunload -i "$moduleid"
./pcsensor "$@"
modload "$hiddriver"