op_cpuspeed.sh: If current speed is higher than allowed max speed, set current speed...
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_cpuspeed.sh
index 61ad0e2..beb1b7e 100755 (executable)
@@ -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