08d5afa292
(Part 4: documentation and configuration files) * Support for detachable sensors. * Cleaned up the API for simplicity and efficiency. * Ability to send capacity/critical/warning events to powerd(8). * Adapted all the code to the new locking order. * Compatibility with the old envsys API: the ENVSYS_GTREINFO and ENVSYS_GTREDATA ioctl(2)s are supported. * Added support for a 'dictionary based communication channel' between sysmon_power(9) and powerd(8), that means there is no 32 bytes event size restriction anymore. * Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40. * All drivers with the n^2 gtredata bug were fixed, PR kern/36226. Tested by: blymn: smsc(4). bouyer: ipmi(4), mfi(4). kefren: ug(4). njoly: viaenv(4), adt7463.c. riz: owtemp(4). xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
25 lines
496 B
Bash
Executable File
25 lines
496 B
Bash
Executable File
#!/bin/sh -
|
|
#
|
|
# $NetBSD: sensor_drive,v 1.1 2007/07/01 07:55:53 xtraeme Exp $
|
|
#
|
|
# Generic script for drive sensors.
|
|
#
|
|
# Arguments passed by powerd(8):
|
|
#
|
|
# script_path device event sensor state_description
|
|
|
|
case "${2}" in
|
|
normal)
|
|
logger -p warning "${0}: normal state reached on ${1} (${3}): ${4}" >&1
|
|
exit 0
|
|
;;
|
|
state-changed)
|
|
logger -p warning "${0}: state changed on ${1} (${3}): ${4}" >&1
|
|
exit 0
|
|
;;
|
|
*)
|
|
logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
|
|
exit 1
|
|
;;
|
|
esac
|