mirror of
https://github.com/shakemid/pcsensor-temper.git
synced 2025-01-21 00:58:17 +01:00
21 lines
426 B
Bash
Executable file
21 lines
426 B
Bash
Executable file
#!/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
|
|
|
|
if [ -n "$moduleid" ]; then
|
|
modunload -i "$moduleid"
|
|
fi
|
|
|
|
./pcsensor "$@"
|
|
|
|
if [ -n "$moduleid" ]; then
|
|
modload "$hiddriver"
|
|
fi
|