NetBSD/etc/powerd/scripts/lid_switch
jmcneill 0814e53527 Don't try to standby on a lid_switch pressed event, this has a few problems:
1. ACPI S1 doesn't work properly for many people on NetBSD
  2. It prevents someone from using their laptop with an external display
2008-06-20 02:38:00 +00:00

26 lines
443 B
Bash
Executable File

#!/bin/sh -
#
# $NetBSD: lid_switch,v 1.5 2008/06/20 02:38:00 jmcneill Exp $
#
# Generic script for lid switch events. We try to put the system to sleep.
#
# Arguments passed by powerd(8):
#
# device event
case "${2}" in
pressed)
#if /etc/rc.d/apmd status >/dev/null ; then
# /usr/sbin/apm -S
#else
# /usr/sbin/apm -d -S
#fi
exit 0
;;
released)
;;
*)
logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
exit 1
esac