pandora-lcd-state: Now renamed to pandora-state and including dirty_expire_centisecs...
[openpandora.oe.git] / recipes / pandora-system / pandora-lcd-state / rc.pandora-lcd-state
diff --git a/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state b/recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state
deleted file mode 100644 (file)
index e8b9ceb..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-
-### BEGIN INIT INFO
-# Provides:          pandora-lcd-state
-# Required-Start:    #adjust
-# Required-Stop:     #adjust
-# Default-Start:     S
-# Default-Stop:      0 1 6
-### END INIT INFO
-DESC="OpenPandora Save and Restore LCD Settings"
-NAME="pandora-lcd-state"
-
-d_stop() {
-       echo "Saving LCD and Nub-Settings"
-       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
-       cat -v /proc/pandora/nub0/scrollx_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub0/scrolly_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub0/scroll_rate| sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub0/mbutton_threshold | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub1/mode | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub1/mouse_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub1/scrollx_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub1/scrolly_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub1/scroll_rate | sed -n '1p' >> /etc/pandora/conf/nubs.state
-       cat -v /proc/pandora/nub1/mbutton_threshold | sed -n '1p' >> /etc/pandora/conf/nubs.state
-}
-
-d_start() {
-       echo "Restoring LCD and Nub-Settings"
-       cat /etc/pandora/conf/brightness.state > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness 
-       cat /etc/pandora/conf/gamma.state > /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma
-       sed -n '1p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mode
-       sed -n '2p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mouse_sensitivity
-       sed -n '3p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/scrollx_sensitivity
-       sed -n '4p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/scrolly_sensitivity
-       sed -n '5p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/scroll_rate
-       sed -n '6p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mbutton_threshold
-       sed -n '7p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mode
-       sed -n '8p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mouse_sensitivity
-       sed -n '9p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/scrollx_sensitivity
-       sed -n '10p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/scrolly_sensitivity
-       sed -n '11p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/scroll_rate
-       sed -n '12p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mbutton_threshold
-}
-
-case "$1" in
-  start)
-       echo -n "Starting $DESC: $NAME - "
-       d_start
-       echo "."
-       ;;
-  stop)
-       echo -n "Stopping $DESC: $NAME - "
-       d_stop
-       echo "."
-       ;;
-  reload)
-       echo -n "Reloading $DESC: $NAME - "
-       d_start
-       echo "."
-       ;;      
-  restart|force-reload)
-       echo -n "Restarting $DESC: $NAME - "
-       d_stop
-       sleep 1
-       d_start
-       echo "."
-       ;;
-  *)
-       echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
-       exit 1
-       ;;
-esac
-
-exit 0