NetBSD/etc/powerd/scripts/reset_button

23 lines
378 B
Plaintext
Raw Normal View History

2003-04-21 00:55:39 +04:00
#!/bin/sh -
#
# $NetBSD: reset_button,v 1.2 2003/10/30 17:32:45 mycroft Exp $
2003-04-21 00:55:39 +04:00
#
# Generic script for reset button events. We simply attempt to
# reboot the system gracefully.
#
# Arguments passed by powerd(8):
#
# device event
case "${2}" in
pressed)
/sbin/shutdown -r now
exit 0
;;
*)
logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
2003-04-21 00:55:39 +04:00
exit 1
;;
esac