tags 449307 patch
thanks

I couldn't reproduce the reporters problems, but I do kinda think it makes 
since to use cpufreq-info to count cpu cores rather than /proc/*. At least 
the maintainer is in charge of the output format in this case, and not at the 
hands of the variable kernel of the day....

Thanks, Kel.
diff -Nrup cpufrequtils-002/debian/cpufrequtils.init cpufrequtils-002.parse-cpufreqinfo/debian/cpufrequtils.init
--- cpufrequtils-002/debian/cpufrequtils.init	2007-11-24 21:48:02.000000000 +1000
+++ cpufrequtils-002.parse-cpufreqinfo/debian/cpufrequtils.init	2007-11-24 21:49:11.000000000 +1000
@@ -52,7 +52,7 @@ check_governor_avail() {
 	return 1;
 }
 
-[ -x $CPUFREQ_SET ] || exit 0
+[ -x $CPUFREQ_SET ] && [ -x $CPUFREQ_INFO ]|| exit 0
 
 if [ -f /etc/default/cpufrequtils ] ; then
 	. /etc/default/cpufrequtils
@@ -73,7 +73,7 @@ if [ -n "$GOVERNOR" ] ; then
 	CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --governor $GOVERNOR"
 fi
 
-CPUS=$(sed -ne 's/^processor[[:space:]]*: \([0-9]\+\)$/\1/p' /proc/cpuinfo)
+CPUS=$($CPUFREQ_INFO | sed -ne 's/^analyzing[[:space:]]CPU[[:space:]]\([0-9]\+\):$/\1/p')
 RETVAL=0
 case "$1" in
 	start|force-reload|restart|reload)

Reply via email to