#!/bin/bash # source application-specific settings [ -f /etc/conf.d/cpufrequtils ] && . /etc/conf.d/cpufrequtils case $1 in "start") if [ -n "$START_OPTS" ]; then for c in $(cpufreq-info -o | awk '$1 == "CPU" { print $2 }') ; do logger "Running cpufreq-set -c ${c} ${START_OPTS}" cpufreq-set -c ${c} ${START_OPTS} done else # Cannot set the governor exit -1 fi ;; "stop") if [ -n "$STOP_OPTS" ]; then for c in $(cpufreq-info -o | awk '$1 == "CPU" { print $2 }') ; do logger "Running cpufreq-set -c ${c} ${STOP_OPTS}" cpufreq-set -c ${c} ${STOP_OPTS} done else # Cannot set the governor exit -1 fi ;; esac exit 0