4 # Provides: pandora-lcd-state
5 # Required-Start: #adjust
6 # Required-Stop: #adjust
11 DESC="OpenPandora Save and Restore LCD Settings"
12 NAME="pandora-lcd-state"
15 echo "Saving LCD and Nub-Settings"
16 cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness > /etc/pandora/conf/brightness.state
17 cat /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma > /etc/pandora/conf/gamma.state
18 cat cat -v /proc/pandora/vsense66 | sed -n '1p' > /etc/pandora/conf/nubs.state
19 cat cat -v /proc/pandora/vsense67 | sed -n '1p' >> /etc/pandora/conf/nubs.state
23 echo "Restoring LCD and Nub-Settings"
24 cat /etc/pandora/conf/brightness.state > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness
25 cat /etc/pandora/conf/gamma.state > /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma
26 sed -n '1p' /etc/pandora/conf/nubs.state > /proc/pandora/vsense66
27 sed -n '2p' /etc/pandora/conf/nubs.state > /proc/pandora/vsense67
32 echo -n "Starting $DESC: $NAME - "
37 echo -n "Stopping $DESC: $NAME - "
42 echo -n "Reloading $DESC: $NAME - "
47 echo -n "Restarting $DESC: $NAME - "
54 echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2