rc.pandora-state: Find out Pandora Type and set it into /tmp/pnd_version
authorMichael Mrozek <EvilDragon@openpandora.org>
Thu, 18 Jul 2013 01:56:43 +0000 (03:56 +0200)
committerMichael Mrozek <EvilDragon@openpandora.org>
Thu, 18 Jul 2013 01:56:43 +0000 (03:56 +0200)
recipes/pandora-system/pandora-state/rc.pandora-state

index 4178d88..529b8d1 100644 (file)
@@ -38,6 +38,9 @@ d_stop() {
 }
 
 d_start() {
+       # Determine Pandora type
+       pnd_version=$(dmesg | grep OMAP3 | grep ES | awk '{print $3}')
+       echo $pnd_version > /tmp/pnd_version
        echo "Restoring Pandora specific settings"
        highpow="$(cat /etc/pandora/conf/led.conf | grep HighPowerLED: | awk -F\: '{print $2}')"
        echo $highpow > /sys/class/leds/pandora\:\:power/brightness #power LED bright
@@ -66,7 +69,6 @@ d_start() {
              echo "No clean shutdown - will CPU Speed will be set to safe value."
              echo "Yes" > /tmp/nocleanwarn
              chmod 777 /tmp/nocleanwarn
-             pnd_version=$(dmesg | grep OMAP3 | grep ES | awk '{print $3}')
                if [ "$pnd_version" == "OMAP3630" ]; then
                  cpuspeed="1000"
                else