aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/zaurusd/files/zaurus-hinge.bl-off
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/zaurusd/files/zaurus-hinge.bl-off')
-rw-r--r--recipes/zaurusd/files/zaurus-hinge.bl-off19
1 files changed, 19 insertions, 0 deletions
diff --git a/recipes/zaurusd/files/zaurus-hinge.bl-off b/recipes/zaurusd/files/zaurus-hinge.bl-off
new file mode 100644
index 0000000000..ba6746ce1b
--- /dev/null
+++ b/recipes/zaurusd/files/zaurus-hinge.bl-off
@@ -0,0 +1,19 @@
+#! /bin/sh
+#
+# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
+# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
+#
+# Filename: zaurus-hinge.bl-off
+# Date: 04-Jun-06
+
+DRIVER="`ls /sys/class/backlight/|head -n 1`"
+BRIGHTNESS_FILE="/sys/class/backlight/$DRIVER/brightness"
+
+if mkdir /var/run/display_brightness.lock
+then
+ cat "$BRIGHTNESS_FILE" > /var/run/display_brightness.tmp
+ echo 0 > "$BRIGHTNESS_FILE"
+ rm -rf /var/run/display_brightness.lock
+else
+ echo "BRIGHTNESS IS LOCKED"
+fi