#!/bin/sh - # # $NetBSD: lid_switch,v 1.3 2006/09/26 02:17:38 jmcneill Exp $ # # Generic script for lid switch events. We do nothing for now. # # 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