]> git.openpandora.org Git - openpandora.oe.git/commitdiff
rc.pandora-state: Now puts a "Yes" into /tmp/nocleanwarn if the system has not shutdo...
authorMichael Mrozek <EvilDragon@openpandora.de>
Tue, 26 Jun 2012 23:48:55 +0000 (01:48 +0200)
committerMichael Mrozek <EvilDragon@openpandora.de>
Tue, 26 Jun 2012 23:48:55 +0000 (01:48 +0200)
.xinitrc: Checks if there's a "Yes" in /tmp/nocleanwarn and sets it to "No" after having shown the warning.
Bumped recipes.

recipes/pandora-system/pandora-skel.bb
recipes/pandora-system/pandora-skel/.xinitrc
recipes/pandora-system/pandora-state.bb
recipes/pandora-system/pandora-state/rc.pandora-state

index 441eeb67624794c61414f8a52835976914990da0..1155032854c1fd2fbdc6e76ffde7967caa8c85f2 100644 (file)
@@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 # /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;)
 RDEPENDS = "shadow"
 
-PR = "r16"
+PR = "r17"
 
 SRC_URI = " \
   file://.xinitrc \     
index 5fb625aa415afb7b3039a39781ce2b13971ae00e..f22c62827b0290896dce85ee9068db5a7a1f092b 100644 (file)
@@ -85,14 +85,16 @@ chmod +x /tmp/gui.stop
 # This way, we can easily do a quick switch from any session to the next one by simply
 # echo'ing the new session executable into /tmp/gui.load and exiting.    
 
-if [ -f /tmp/nocleanwarn ]; then
+nocleanwarn=$(cat /tmp/nocleanwarn)
+
+if [ $nocleanwarn = "Yes" ]; then
     defmhz="$(cat /etc/pandora/conf/cpu.conf | grep default | awk -F\: '{print $2}')"
       if [ $defmhz -gt 600 ]; then
-         if zenity --question --title="Unclean Shutdown" --text="Warning!\n\nThe system has not been shutdown properly last time.\n\nAs you overclocked the CPU as default speed, this might be the reason for that.\nTherefore CPU speed has been currently set to 500 MHz.\n\nShould it be set to your default speed ($defmhz MHz) or shall we keep the 500 MHz for this session?" --ok-label="Set it to $defmhz MHz" --cancel-label="Keep 500MHz"; then
+         if zenity --question --title="Unclean Shutdown" --text="Warning!\n\nThe system has not been shutdown properly last time.\n\nAs you overclocked the CPU as default speed, this might be the reason for that.\nTherefore CPU speed has been currently set to 600 MHz.\n\nShould it be set to your default speed ($defmhz MHz) or shall we keep the 600 MHz for this session?" --ok-label="Set it to $defmhz MHz" --cancel-label="Keep 500MHz"; then
            sudo /usr/pandora/scripts/op_cpuspeed.sh $defmhz
          fi
       fi
-  rm /tmp/nocleanwarn
+  echo "No" > /tmp/nocleanwarn
 fi
 
 while true
index a2ad78e9466edac973ed1daf0872a138af5916b8..eb76275cf1b4e505bab6e31b03b08e9ffacb694f 100755 (executable)
@@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 
 RDEPENDS = "pandora-scripts"
 
-PR = "r12"
+PR = "r13"
 inherit update-rc.d
 
 INITSCRIPT_NAME = "pandora-state"
index dc548bac08ddf9bd3cc5f393ff7fd87b9bb293a3..7fd1de4e7f3d539cc266e9da77163a8960b16898 100644 (file)
@@ -56,7 +56,7 @@ d_start() {
              /usr/pandora/scripts/op_cpuspeed.sh -n $cpuspeed
        else
              echo "No clean shutdown - will not set CPU speed"
-             touch /tmp/nocleanwarn
+             echo "Yes" > /tmp/nocleanwarn
        fi
        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