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
|