new file: testdata/scripts/op_lid.sh
authorvimacs <vimacs@pndtest>
Thu, 31 Dec 2009 01:59:34 +0000 (02:59 +0100)
committervimacs <vimacs@pndtest>
Thu, 31 Dec 2009 01:59:34 +0000 (02:59 +0100)
testdata/scripts/op_lid.sh [new file with mode: 0644]

diff --git a/testdata/scripts/op_lid.sh b/testdata/scripts/op_lid.sh
new file mode 100644 (file)
index 0000000..1ec445d
--- /dev/null
@@ -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
+