Sync usage with man page.
[netbsd-mini2440.git] / etc / powerd / scripts / sensor_indicator
blobb95a71eef46718954d0ed05b02a65218ce4971eb
1 #!/bin/sh -
3 # $NetBSD: sensor_indicator,v 1.3 2007/10/11 00:11:24 xtraeme Exp $
5 # Generic script for indicator and integer sensors.
7 # Arguments passed by powerd(8):
9 # script_path device event sensor
11 case "${2}" in
12 normal)
13 logger -p warning "${0}: ($1) normal state entered [${3}]" >&1
14 exit 0
16 critical)
17 logger -p warning "${0}: ($1) critical state entered [${3}]" >&1
18 exit 0
20 critical-under)
21 logger -p warning "${0}: ($1) dropped below critical limit [${3}]" >&1
22 exit 0
24 critical-over)
25 logger -p warning "${0}: ($1) critical limit exceeded [${3}]" >&1
26 exit 0
28 warning-under)
29 logger -p warning "${0}: ($1) dropped below warning limit [${3}]" >&1
30 exit 0
32 warning-over)
33 logger -p warning "${0}: ($1) warning limit exceeded [${3}]" >&1
34 exit 0
37 logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
38 exit 1
40 esac