From 805e252053d92691c19ef5609fd3117b288bdc35 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Fri, 4 Jun 2010 23:29:46 +0200 Subject: [PATCH] pandora-lcd-state: Doesn't save brightness when display is off --- .../pandora-system/pandora-lcd-state/rc.pandora-lcd-state | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state b/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state index 9b7b5d0..e8b9ceb 100644 --- a/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state +++ b/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state @@ -13,7 +13,10 @@ NAME="pandora-lcd-state" d_stop() { echo "Saving LCD and Nub-Settings" - cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness > /etc/pandora/conf/brightness.state + bright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness) + if [ $bright != "0" ]; then + cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness > /etc/pandora/conf/brightness.state + fi cat /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma > /etc/pandora/conf/gamma.state cat -v /proc/pandora/nub0/mode | sed -n '1p' > /etc/pandora/conf/nubs.state cat -v /proc/pandora/nub0/mouse_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state -- 2.39.2