.xinitrc: Checks if there's a "Yes" in /tmp/nocleanwarn and sets it to "No" after having shown the warning.
Bumped recipes.
# /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;)
RDEPENDS = "shadow"
# /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;)
RDEPENDS = "shadow"
SRC_URI = " \
file://.xinitrc \
SRC_URI = " \
file://.xinitrc \
# 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.
# 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
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
sudo /usr/pandora/scripts/op_cpuspeed.sh $defmhz
fi
fi
+ echo "No" > /tmp/nocleanwarn
RDEPENDS = "pandora-scripts"
RDEPENDS = "pandora-scripts"
inherit update-rc.d
INITSCRIPT_NAME = "pandora-state"
inherit update-rc.d
INITSCRIPT_NAME = "pandora-state"
/usr/pandora/scripts/op_cpuspeed.sh -n $cpuspeed
else
echo "No clean shutdown - will not set CPU speed"
/usr/pandora/scripts/op_cpuspeed.sh -n $cpuspeed
else
echo "No clean shutdown - will not set CPU speed"
+ 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
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