power_button revision 1.2
1#!/bin/sh - 2# 3# $NetBSD: power_button,v 1.2 2003/10/30 17:32:45 mycroft Exp $ 4# 5# Generic script for power button events. We simply attempt to 6# shut the system down gracefully, and let the kernel handle 7# the poweroff. 8# 9# Arguments passed by powerd(8): 10# 11# device event 12 13case "${2}" in 14pressed) 15 /sbin/shutdown -p now 16 exit 0 17 ;; 18 19*) 20 logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1 21 exit 1 22 ;; 23esac 24