41 lines
844 B
Bash
Executable File
41 lines
844 B
Bash
Executable File
#!/bin/sh -
|
|
#
|
|
# $NetBSD: sensor_fan,v 1.3 2007/10/11 00:30:47 xtraeme Exp $
|
|
#
|
|
# Generic script for fan sensors.
|
|
#
|
|
# Arguments passed by powerd(8):
|
|
#
|
|
# script_path device event sensor
|
|
|
|
case "${2}" in
|
|
normal)
|
|
logger -p warning "${0}: ($1) normal state entered [${3}]" >&1
|
|
exit 0
|
|
;;
|
|
critical)
|
|
logger -p warning "${0}: ($1) critical state entered [${3}]" >&1
|
|
exit 0
|
|
;;
|
|
critical-under)
|
|
logger -p warning "${0}: ($1) dropped below critical limit [${3}]" >&1
|
|
exit 0
|
|
;;
|
|
critical-over)
|
|
logger -p warning "${0}: ($1) critical limit exceeded [${3}]" >&1
|
|
exit 0
|
|
;;
|
|
warning-under)
|
|
logger -p warning "${0}: ($1) dropped below warning limit [${3}]" >&1
|
|
exit 0
|
|
;;
|
|
warning-over)
|
|
logger -p warning "${0}: ($1) warning limit exceeded [${3}]" >&1
|
|
exit 0
|
|
;;
|
|
*)
|
|
logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
|
|
exit 1
|
|
;;
|
|
esac
|