#!/bin/sh
for x in /sys/devices/system/cpu/cpu[0-9]*/; do
 if [ -f $x"cpufreq/scaling_governor" ]; then
  echo -n ondemand > $x"cpufreq/scaling_governor";
 fi
done
            
