diff --git a/etc/powerd/scripts/sensor_battery b/etc/powerd/scripts/sensor_battery index b2042f39dbbd..8a8fe73951fb 100755 --- a/etc/powerd/scripts/sensor_battery +++ b/etc/powerd/scripts/sensor_battery @@ -1,32 +1,24 @@ #!/bin/sh - # -# $NetBSD: sensor_battery,v 1.2 2007/07/17 13:56:25 xtraeme Exp $ +# $NetBSD: sensor_battery,v 1.3 2007/09/04 16:59:49 xtraeme Exp $ # # Generic script for battery sensors. # # Arguments passed by powerd(8): # -# script_path device event sensor +# script_path device event sensor state_description case "${2}" in normal) - logger -p warning "${0}: ${3}: NORMAL: capacity reached normal state (${1})" >&1 + logger -p warning "${0}: (${3}) capacity reached normal state (${1})" >&1 exit 0 ;; -critical) - logger -p warning "${0}: ${3}: CRITICAL: capacity dropped below limit! (${1})" >&1 - exit 0 - ;; -warning-under) - logger -p warning "${0}: ${3}: WARNING: capacity dropped below limit (${1})" >&1 - exit 0 - ;; -critical-under) - logger -p warning "${0}: ${3}: CRITICAL: capacity dropped below low critical limit! (${1})" >&1 +state-changed) + logger -p warning "${0}: (${3}) state changed to ${4} [${1}]" >&1 exit 0 ;; user-capacity) - logger -p warning "${0}: ${3}: USER DEFINED: capacity dropped below limit (${1})" >&1 + logger -p warning "${0}: (${3}) USER DEFINED: capacity dropped below limit (${1})" >&1 exit 0 ;; *)