Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / etc / powerd / scripts / lid_switch
blobe433291934c33bf0dd1078215f4e92771eb3955e
1 #!/bin/sh -
3 # $NetBSD: lid_switch,v 1.4 2006/09/27 01:41:45 jnemeth Exp $
5 # Generic script for lid switch events. We try to put the system to sleep.
7 # Arguments passed by powerd(8):
9 # device event
11 case "${2}" in
12 pressed)
13 #if /etc/rc.d/apmd status >/dev/null ; then
14 # /usr/sbin/apm -S
15 #else
16 # /usr/sbin/apm -d -S
17 #fi
18 exit 0
20 released)
23 logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
24 exit 1
25 esac