Module Name:    src
Committed By:   macallan
Date:           Thu Oct 28 02:06:03 UTC 2010

Modified Files:
        src/etc/powerd/scripts: lid_switch

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


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/powerd/scripts/lid_switch

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.7 src/etc/powerd/scripts/lid_switch:1.8
--- src/etc/powerd/scripts/lid_switch:1.7	Sun Sep 19 21:47:28 2010
+++ src/etc/powerd/scripts/lid_switch	Thu Oct 28 02:06:02 2010
@@ -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
 	;;
 *)

Reply via email to