summaryrefslogtreecommitdiff
path: root/packages/zaurusd/files/zaurus-hinge.bl-off
blob: ba6746ce1b85d0c5be4d0679adf76ba27fee8e1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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