--- /etc/rc.d/cpufreq 2010-07-19 04:58:30.000000000 +0200 +++ /home/alex/Programme/archiv/cpufreq 2011-09-02 19:13:42.590831894 +0200 @@ -52,7 +52,30 @@ $0 start ;; set) - # TODO: make callable... "cpufreq set 800MHz" + stat_busy "Set cpu to frequency:" + if [ "$2" != "" ]; then + CPUS=$(sed -ne 's/^processor.* \([0-9]\+\)$/\1/p' /proc/cpuinfo) + if modprobe -q cpufreq_userspace; then + for cpu in $CPUS; do + stat_append " $cpu" + if ! cpufreq-set -c $cpu -f $2; then + stat_busy " $2 is not a valid frequency" + stat_fail + exit 1 + fi + done + stat_done + else + stat_busy " No userspace governor available" + stat_fail + fi + + else + stat_busy " No frequency given as additional argument" + stat_fail + fi + + ;; *) echo "usage: $0 {start|stop|restart}"