From 4f3651e6777ca95bf97e033c01c271086a0f552b Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sun, 3 Aug 2008 08:36:07 +0200 Subject: [PATCH] cpufreq initskript activate collectd only if cpufreq is supported now --- src/initscripts/init.d/cpufreq | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/initscripts/init.d/cpufreq b/src/initscripts/init.d/cpufreq index fb326d7eb0..a316833b72 100644 --- a/src/initscripts/init.d/cpufreq +++ b/src/initscripts/init.d/cpufreq @@ -19,6 +19,7 @@ case "${1}" in start) boot_mesg -n "Starting cpufreq ... " + # try cpufreq hardware depend modules for module in acpi-cpufreq cpufreq-nforce2 e-powersaver \ gx-suspmod longhaul longrun p4-clockmod powernow-k6 \ powernow-k7 powernow-k8 speedstep-centrino speedstep-ich \ @@ -29,6 +30,7 @@ case "${1}" in fi done boot_mesg "" + # load cqufreq governors modprobe cpufreq_conservative modprobe cpufreq_ondemand @@ -37,11 +39,13 @@ case "${1}" in # Set the governor to ondemand cpufreq-set -g ondemand - evaluate_retval; - - # activate cpufreq collectd module - sed -i -e "s|#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf - + if [ ${?} = 0 ]; then + # activate cpufreq collectd module + sed -i -e "s|#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf + echo_ok; + else + echo_failure; + fi exit 0; ;; *) -- 2.39.2