Module Name: src
Committed By: abs
Date: Sun Sep 19 21:47:28 UTC 2010
Modified Files:
src/etc/powerd/scripts: lid_switch sleep_button
Log Message:
use '/etc/rc.d/apmd onestatus' rather than '/etc/rc.d/apmd status',
so we DTRT if apmd is set to NO in rc.conf
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/etc/powerd/scripts/lid_switch
cvs rdiff -u -r1.5 -r1.6 src/etc/powerd/scripts/sleep_button
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/powerd/scripts/lid_switch
diff -u src/etc/powerd/scripts/lid_switch:1.6 src/etc/powerd/scripts/lid_switch:1.7
--- src/etc/powerd/scripts/lid_switch:1.6 Tue Sep 14 04:37:04 2010
+++ src/etc/powerd/scripts/lid_switch Sun Sep 19 21:47:28 2010
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: lid_switch,v 1.6 2010/09/14 04:37:04 macallan Exp $
+# $NetBSD: lid_switch,v 1.7 2010/09/19 21:47:28 abs Exp $
#
# Generic script for lid switch events. We try to put the system to sleep.
#
@@ -10,7 +10,7 @@
case "${2}" in
pressed)
- #if /etc/rc.d/apmd status >/dev/null ; then
+ #if /etc/rc.d/apmd onestatus >/dev/null ; then
# /usr/sbin/apm -S
#else
# /usr/sbin/apm -d -S
Index: src/etc/powerd/scripts/sleep_button
diff -u src/etc/powerd/scripts/sleep_button:1.5 src/etc/powerd/scripts/sleep_button:1.6
--- src/etc/powerd/scripts/sleep_button:1.5 Fri Jun 6 23:13:58 2008
+++ src/etc/powerd/scripts/sleep_button Sun Sep 19 21:47:28 2010
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: sleep_button,v 1.5 2008/06/06 23:13:58 jmcneill Exp $
+# $NetBSD: sleep_button,v 1.6 2010/09/19 21:47:28 abs Exp $
#
# Generic script for sleep button events.
#
@@ -20,7 +20,7 @@
/sbin/sysctl -w machdep.sleep_state=3
else
sleep 1
- if /etc/rc.d/apmd status >/dev/null ; then
+ if /etc/rc.d/apmd onestatus >/dev/null ; then
/usr/sbin/apm -z
else
/usr/sbin/apm -d -z