summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpufreq.init28
1 files changed, 3 insertions, 25 deletions
diff --git a/cpufreq.init b/cpufreq.init
index e3a1a8f..7936dc7 100644
--- a/cpufreq.init
+++ b/cpufreq.init
@@ -15,33 +15,11 @@ RETVAL=0
start() {
gprintf "Setting CPU frequency settings: "
touch /var/lock/subsys/cpufreq
- 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
- [ "x$MIN_FREQ" != "x" ] && [ -f $cpu/cpufreq/scaling_min_freq ] && echo $MIN_FREQ > $cpu/cpufreq/scaling_min_freq
- done
+ /usr/bin/cpufreq
success
echo
}
-real_stop() {
- gprintf "Resetting CPU frequency settings: "
- # make sure no governor module is in use first
- # by switching to userspace governor (because it's built-in and won't modify frequency)
- for cpu in /sys/devices/system/cpu/* ; do
- [ -f $cpu/cpufreq/scaling_governor ] && echo userspace > $cpu/cpufreq/scaling_governor
- done
- rm -f /var/lock/subsys/cpufreq
- success
- echo
-}
-
-restart() {
- real_stop
- start
-}
-
case "$1" in
start)
start
@@ -49,11 +27,11 @@ case "$1" in
stop)
;;
restart|reload)
- restart
+ start
;;
condrestart)
if [ -f /var/lock/subsys/cpufreq ]; then
- restart
+ start
fi
;;
status)