Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/powerd/scripts adapt to how backlight control is suppose...



details:   https://anonhg.NetBSD.org/src/rev/6b77345174dc
branches:  trunk
changeset: 758233:6b77345174dc
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Oct 28 02:06:02 2010 +0000

description:
adapt to how backlight control is supposed to work - just flip the switch and
we don't need to save the brightness level

diffstat:

 etc/powerd/scripts/lid_switch |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r d1ca25ecf26f -r 6b77345174dc etc/powerd/scripts/lid_switch
--- a/etc/powerd/scripts/lid_switch     Wed Oct 27 20:46:54 2010 +0000
+++ b/etc/powerd/scripts/lid_switch     Thu Oct 28 02:06:02 2010 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: lid_switch,v 1.7 2010/09/19 21:47:28 abs Exp $
+#      $NetBSD: lid_switch,v 1.8 2010/10/28 02:06:02 macallan Exp $
 #
 # Generic script for lid switch events.  We try to put the system to sleep.
 #
@@ -10,19 +10,16 @@
 
 case "${2}" in
 pressed)
-       #if /etc/rc.d/apmd onestatus >/dev/null ; then
+       #if /etc/rc.d/apmd status >/dev/null ; then
        #       /usr/sbin/apm -S
        #else
        #       /usr/sbin/apm -d -S
        #fi
-       wsconsctl -d backlight >/tmp/backlight
        wsconsctl -d -w backlight=0 >/dev/null
        exit 0
        ;;
 released)
-       if [ -f "/tmp/backlight" ]; then
-               wsconsctl -d -w `cat /tmp/backlight`    
-       fi
+       wsconsctl -d -w backlight=1 >/dev/null
        exit 0
        ;;
 *)



Home | Main Index | Thread Index | Old Index