#!/sbin/runscript depend() { need localmount acpid } checkconfig() { if [ ! -e /proc/cpufreq -a ! -e /sys/devices/system/cpu/cpu0/cpufreq ] ; then eerror "CPUFreq support has not been compiled into the kernel" return 1 fi } start() { checkconfig || return 1 ebegin "Switching to OnDemand" #if [ cat /sys/devices/system/cpu/cpu0/cpurfreq/scaling_governor == "ondemand" ] ; then # eecho "OnDemand is already activated" #else echo 'ondemand' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor #fi eend $? } stop() { ebegin "Stopping OnDemand" echo 'performance' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor eend $? }