From 9630f4b7fa7ff7480ecfc9943caeb129d5c41499 Mon Sep 17 00:00:00 2001 From: vimacs Date: Thu, 31 Dec 2009 02:59:34 +0100 Subject: [PATCH] new file: testdata/scripts/op_lid.sh --- testdata/scripts/op_lid.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 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 + -- 2.39.5