Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc/powerd/scripts Use hw.acpi.sleep.state instead of machde...
details: https://anonhg.NetBSD.org/src/rev/9c3a85f63cc1
branches: trunk
changeset: 760220:9c3a85f63cc1
user: jruoho <jruoho%NetBSD.org@localhost>
date: Fri Dec 31 09:36:15 2010 +0000
description:
Use hw.acpi.sleep.state instead of machdep.sleep_state.
diffstat:
etc/powerd/scripts/sleep_button | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (46 lines):
diff -r ae6d52871dcc -r 9c3a85f63cc1 etc/powerd/scripts/sleep_button
--- a/etc/powerd/scripts/sleep_button Fri Dec 31 09:33:10 2010 +0000
+++ b/etc/powerd/scripts/sleep_button Fri Dec 31 09:36:15 2010 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: sleep_button,v 1.6 2010/09/19 21:47:28 abs Exp $
+# $NetBSD: sleep_button,v 1.7 2010/12/31 09:36:15 jruoho Exp $
#
# Generic script for sleep button events.
#
@@ -10,14 +10,16 @@
case "${2}" in
pressed)
+
/etc/rc.d/btdevctl stop
/etc/rc.d/btconfig stop
/etc/rc.d/ntpd stop
/etc/rc.d/dhclient stop
/etc/rc.d/network stop
/etc/rc.d/wpa_supplicant stop
- if /sbin/sysctl machdep.sleep_state >/dev/null 2>&1; then
- /sbin/sysctl -w machdep.sleep_state=3
+
+ if /sbin/sysctl hw.acpi.sleep.state >/dev/null 2>&1; then
+ /sbin/sysctl -w hw.acpi.sleep.state=3
else
sleep 1
if /etc/rc.d/apmd onestatus >/dev/null ; then
@@ -28,6 +30,7 @@
# ... waking up
sleep 1
fi
+
/etc/rc.d/wpa_supplicant start
/etc/rc.d/network start
/etc/rc.d/dhclient start
@@ -36,6 +39,7 @@
/etc/rc.d/btconfig start
/etc/rc.d/btdevctl start
;;
+
released)
# Note that we don't really need to handle a released event here,
# so we can gracefully exit.
Home |
Main Index |
Thread Index |
Old Index