Package: cpufrequtils
Version: 002-3
Severity: wishlist
Tags: patch
Now that the loadcpufreq init.d script in most cases load the required
kernel modules automatically at boot time. it might be an idea to
enable init.d/cpufrequtils by default if the ondemand governor is
available in
/sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors,
instead of asking the sysadmin to enable it.
Something like this in init.d/cpufrequtils might do it:
--- /etc/init.d/cpufrequtils 2007-05-25 14:56:10.000000000 +0200
+++ debian/cpufrequtils.init 2007-05-26 17:59:01.000000000 +0200
@@ -46,10 +46,21 @@
[ -x $CPUFREQ_SET ] || exit 0
+# First load to update GOVERNOR if set in /etc/default/, to use it
+# when checking caling_available_governors
+if [ -f /etc/default/cpufrequtils ] ; then
+ . /etc/default/cpufrequtils
+fi
+
+for info in /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors ;
do
+ if [ -f $info ] && grep -q $GOVERNOR $info ; then
+ ENABLE=true
+ fi
+done
+
+# Next load to update ENABLE if set in /etc/default/
if [ -f /etc/default/cpufrequtils ] ; then
. /etc/default/cpufrequtils
-else
- ENABLE="false"
fi
# if not enabled then exit gracefully
It load the file in /etc/default/ twice to check for the wanted
governor and allow the ENABLE variable to be used to disable the
service.
Friendly,
--
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]