From: vimacs Date: Thu, 31 Dec 2009 01:59:34 +0000 (+0100) Subject: new file: testdata/scripts/op_lid.sh X-Git-Tag: Release-2010-05/1~127 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9630f4b7fa7ff7480ecfc9943caeb129d5c41499;p=pandora-libraries.git new file: testdata/scripts/op_lid.sh --- diff --git a/testdata/scripts/op_lid.sh b/testdata/scripts/op_lid.sh new file mode 100644 index 0000000..1ec445d --- /dev/null +++ b/testdata/scripts/op_lid.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#actions done when the lid is closed +#only argument is 0 for open 1 for closed + +if [ "$1" = "1" ]; then #lid was closed + /usr/pandora/scripts/op_bright.sh 0 +elif [ "$1" = "0" ]; then # lid was opend + /usr/pandora/scripts/op_bright.sh $(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/max_brightness) +fi +