From: Michael Mrozek Date: Mon, 17 Jan 2011 10:09:32 +0000 (+0100) Subject: .xinitrc: Added warning message if system crashed due to overclocked default CPU... X-Git-Tag: sz_beta3~215 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5533c5ec97e1eaf181cc01d957f76a6084138b7;p=openpandora.oe.git .xinitrc: Added warning message if system crashed due to overclocked default CPU speed --- diff --git a/recipes/pandora-system/pandora-skel.bb b/recipes/pandora-system/pandora-skel.bb index 73bd78b..5b989e7 100644 --- a/recipes/pandora-system/pandora-skel.bb +++ b/recipes/pandora-system/pandora-skel.bb @@ -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 = "r4" +PR = "r5" SRC_URI = " \ file://.xinitrc \ diff --git a/recipes/pandora-system/pandora-skel/.xinitrc b/recipes/pandora-system/pandora-skel/.xinitrc index 6064a18..4a1ea66 100644 --- a/recipes/pandora-system/pandora-skel/.xinitrc +++ b/recipes/pandora-system/pandora-skel/.xinitrc @@ -79,6 +79,13 @@ 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 + 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." + fi + rm /tmp/nocleanwarn + fi while true do rm /tmp/gui.load