diff options
author | Matthias Hentges <oe@hentges.net> | 2007-12-23 16:23:32 +0000 |
---|---|---|
committer | Matthias Hentges <oe@hentges.net> | 2007-12-23 16:23:32 +0000 |
commit | 40d4ae6f75eb1a8f45f5f5d71e96c9c8fa6a2e69 (patch) | |
tree | 3b99f684ac70c5740557e9ba55c5a7ce654fca1b /packages/zaurusd/files/zaurus-hinge.bl-off | |
parent | 485571cde482594a85494905868eae7a46cfc3a1 (diff) |
zaurusd: Make hinge scripts independent from bl.
Diffstat (limited to 'packages/zaurusd/files/zaurus-hinge.bl-off')
-rw-r--r-- | packages/zaurusd/files/zaurus-hinge.bl-off | 15 |
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 |