From 54d7b7267ebaf8d98570edf8219ccd59626d41a9 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Tue, 26 Jun 2012 10:26:41 +0200 Subject: [PATCH] op_cpuspeed.sh: If current speed is higher than allowed max speed, set current speed to max speed. --- recipes/pandora-system/pandora-scripts/op_cpuspeed.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/pandora-system/pandora-scripts/op_cpuspeed.sh b/recipes/pandora-system/pandora-scripts/op_cpuspeed.sh index 61ad0e2..beb1b7e 100755 --- a/recipes/pandora-system/pandora-scripts/op_cpuspeed.sh +++ b/recipes/pandora-system/pandora-scripts/op_cpuspeed.sh @@ -8,6 +8,10 @@ device=/proc/pandora/cpu_mhz_max curmhz="$(cat $device)" newmhz="$(cat $device)" +if [ "$curmhz" -gt "$maxmhz" ]; then + curmhz=$maxmhz +fi + if [ "$1" = "-n" ]; then shift warn=no -- 2.39.2