lid_switch revision 1.3
11.1Smycroft#!/bin/sh -
21.1Smycroft#
31.3Sjmcneill#	$NetBSD: lid_switch,v 1.3 2006/09/26 02:17:38 jmcneill Exp $
41.1Smycroft#
51.2Smycroft# Generic script for lid switch events.  We do nothing for now.
61.1Smycroft#
71.1Smycroft# Arguments passed by powerd(8):
81.1Smycroft#
91.1Smycroft#	device event
101.1Smycroft
111.1Smycroftcase "${2}" in
121.3Sjmcneillpressed)
131.3Sjmcneill	if /etc/rc.d/apmd status >/dev/null ; then
141.3Sjmcneill		/usr/sbin/apm -S
151.3Sjmcneill	else
161.3Sjmcneill		/usr/sbin/apm -d -S
171.3Sjmcneill	fi
181.3Sjmcneill	exit 0
191.3Sjmcneill	;;
201.3Sjmcneillreleased)
211.3Sjmcneill	;;
221.1Smycroft*)
231.3Sjmcneill	logger -p warning "${0}: unsupported event ${2} on device ${1}" >&1
241.1Smycroft	exit 1
251.1Smycroftesac
26