From: Michael Mrozek Date: Thu, 16 Feb 2012 01:57:44 +0000 (+0100) Subject: .xinitrc: If system starts after a crash, it is now possible to select whether to... X-Git-Tag: sz_beta3~29 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=56bea58e61ce186ead1e5f721000713c48433808 .xinitrc: If system starts after a crash, it is now possible to select whether to run at safe speed (500MHz) or user-setted default speed --- diff --git a/recipes/pandora-system/pandora-skel/.xinitrc b/recipes/pandora-system/pandora-skel/.xinitrc index 50b2e6b..5fb625a 100644 --- a/recipes/pandora-system/pandora-skel/.xinitrc +++ b/recipes/pandora-system/pandora-skel/.xinitrc @@ -83,15 +83,18 @@ chmod +x /tmp/gui.stop # after the old one is quit by simply executing the command that's in /tmp/gui.load # 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. +# echo'ing the new session executable into /tmp/gui.load and exiting. if [ -f /tmp/nocleanwarn ]; then defmhz="$(cat /etc/pandora/conf/cpu.conf | grep default | awk -F\: '{print $2}')" if [ $defmhz -gt 600 ]; then - zenity --info --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, for this session, the current CPU speed has been set to 500 MHz." + 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 + sudo /usr/pandora/scripts/op_cpuspeed.sh $defmhz + fi fi rm /tmp/nocleanwarn - fi +fi + while true do rm /tmp/gui.load