summaryrefslogtreecommitdiff
path: root/packages/zaurusd/files/zaurus-hinge.bl-off
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2007-12-24 01:10:16 +0000
committerRod Whitby <rod@whitby.id.au>2007-12-24 01:10:16 +0000
commit516565b4587daaf2852a2e19a182cb17b78d3b7a (patch)
tree5b87f9f38cf962fcc6e64948b2597e8bfda24ef9 /packages/zaurusd/files/zaurus-hinge.bl-off
parente4504bf43b80eb1176c59436364f07449220474f (diff)
parent28371934e216a1cfd6e8c2d27822993f5cf97774 (diff)
merge of '74c545ed021de12395e8e037da79100e4b8f5a18'
and 'a70eb4537d92437b2af4fb50a7250a04e5814ee4'
Diffstat (limited to 'packages/zaurusd/files/zaurus-hinge.bl-off')
-rw-r--r--packages/zaurusd/files/zaurus-hinge.bl-off15
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/zaurusd/files/zaurus-hinge.bl-off b/packages/zaurusd/files/zaurus-hinge.bl-off
index ec3cefb2ca..ba6746ce1b 100644
--- a/packages/zaurusd/files/zaurus-hinge.bl-off
+++ b/packages/zaurusd/files/zaurus-hinge.bl-off
@@ -6,13 +6,14 @@
# Filename: zaurus-hinge.bl-off
# Date: 04-Jun-06
-#test -z "${ZD_BINDIR}" && ZD_BINDIR="/usr/bin"
-#${ZD_BINDIR}/bl off
-
-
-STEP=5
DRIVER="`ls /sys/class/backlight/|head -n 1`"
BRIGHTNESS_FILE="/sys/class/backlight/$DRIVER/brightness"
-cat "$BRIGHTNESS_FILE" > /var/run/display_brightness.tmp
-echo 0 > "$BRIGHTNESS_FILE"
+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