op_cpuspeed.sh: fix too unspecific grep arguments
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 17 Jun 2011 21:40:12 +0000 (00:40 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 17 Jun 2011 21:40:12 +0000 (00:40 +0300)
this fixes the following error:
/usr/pandora/scripts/op_cpuspeed.sh: line 35: [: too many arguments

recipes/pandora-system/pandora-scripts/op_cpuspeed.sh

index 45bddee..379493d 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/bash
 #get value range
-minmhz="$(cat /etc/pandora/conf/cpu.conf | grep min | awk -F\: '{print $2}')"
-safemhz="$(cat /etc/pandora/conf/cpu.conf | grep safe | awk -F\: '{print $2}')"
-maxmhz="$(cat /etc/pandora/conf/cpu.conf | grep max | awk -F\: '{print $2}')"
-warn="$(cat /etc/pandora/conf/cpu.conf | grep warn | awk -F\: '{print $2}')"
+minmhz="$(cat /etc/pandora/conf/cpu.conf | grep 'min:' | awk -F\: '{print $2}')"
+safemhz="$(cat /etc/pandora/conf/cpu.conf | grep 'safe:' | awk -F\: '{print $2}')"
+maxmhz="$(cat /etc/pandora/conf/cpu.conf | grep 'max:' | awk -F\: '{print $2}')"
+warn="$(cat /etc/pandora/conf/cpu.conf | grep 'warn:' | awk -F\: '{print $2}')"
 curmhz="$(cat /proc/pandora/cpu_mhz_max)"
 newmhz="$(cat /proc/pandora/cpu_mhz_max)"
 device=/proc/pandora/cpu_mhz_max