From f5533c5ec97e1eaf181cc01d957f76a6084138b7 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Mon, 17 Jan 2011 11:09:32 +0100 Subject: [PATCH] .xinitrc: Added warning message if system crashed due to overclocked default CPU speed --- recipes/pandora-system/pandora-skel.bb | 2 +- recipes/pandora-system/pandora-skel/.xinitrc | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- 2.47.2