sensor_resistance revision 1.1.4.1
1#!/bin/sh - 2# 3# $NetBSD: sensor_resistance,v 1.1.4.1 2007/11/06 23:10:30 matt Exp $ 4# 5# Generic script for resistance sensors. 6# 7# Arguments passed by powerd(8): 8# 9# script_path device event sensor 10 11case "${2}" in 12normal) 13 logger -p warning "${0}: ($1) normal state entered [${3}]" >&1 14 exit 0 15 ;; 16critical) 17 logger -p warning "${0}: ($1) critical state entered [${3}]" >&1 18 exit 0 19 ;; 20critical-under) 21 logger -p warning "${0}: ($1) dropped below critical limit [${3}]" >&1 22 exit 0 23 ;; 24critical-over) 25 logger -p warning "${0}: ($1) critical limit exceeded [${3}]" >&1 26 exit 0 27 ;; 28warning-under) 29 logger -p warning "${0}: ($1) dropped below warning limit [${3}]" >&1 30 exit 0 31 ;; 32warning-over) 33 logger -p warning "${0}: ($1) warning limit exceeded [${3}]" >&1 34 exit 0 35 ;; 36*) 37 logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1 38 exit 1 39 ;; 40esac 41