summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-04-22 16:12:33 +0000
committerColin Guthrie <colin@mageia.org>2012-04-22 16:12:33 +0000
commitb8d73448212e8d470aa7d4a07a26d5865e73ffb3 (patch)
tree1b2e0d8a5f6f0306dd1e814da7a8a5bedcc6b5e1
parentcd2602c58d73822e51e18b1955607204e16c70a7 (diff)
downloadcpufreq-b8d73448212e8d470aa7d4a07a26d5865e73ffb3.tar
cpufreq-b8d73448212e8d470aa7d4a07a26d5865e73ffb3.tar.gz
cpufreq-b8d73448212e8d470aa7d4a07a26d5865e73ffb3.tar.bz2
cpufreq-b8d73448212e8d470aa7d4a07a26d5865e73ffb3.tar.xz
cpufreq-b8d73448212e8d470aa7d4a07a26d5865e73ffb3.zip
Let the script use the default governor without the config file.
-rw-r--r--cpufreq2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpufreq b/cpufreq
index a017877..2a3e6ac 100644
--- a/cpufreq
+++ b/cpufreq
@@ -1,6 +1,8 @@
#!/bin/bash
+GOVERNOR=ondemand
test -f /etc/sysconfig/cpufreq && . /etc/sysconfig/cpufreq
+
for cpu in /sys/devices/system/cpu/* ; do
[ "x$GOVERNOR" != "x" ] && [ -f $cpu/cpufreq/scaling_governor ] && echo $GOVERNOR > $cpu/cpufreq/scaling_governor
[ "x$MAX_FREQ" != "x" ] && [ -f $cpu/cpufreq/scaling_max_freq ] && echo $MAX_FREQ > $cpu/cpufreq/scaling_max_freq