]> git.openpandora.org Git - openpandora.oe.git/commitdiff
op_cpuspeed.sh: If current speed is higher than allowed max speed, set current speed...
authorMichael Mrozek <EvilDragon@openpandora.de>
Tue, 26 Jun 2012 08:26:41 +0000 (10:26 +0200)
committerMichael Mrozek <EvilDragon@openpandora.de>
Tue, 26 Jun 2012 08:26:41 +0000 (10:26 +0200)
recipes/pandora-system/pandora-scripts/op_cpuspeed.sh

index 61ad0e29137ab286b04a67ec13d34d96eec596c3..beb1b7e3eda7e2e0b52c525878cbed6db4c5a18f 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