The /etc/init.d/foldingathome startup scripts attempts to identify a CPU count
automatically if the CPU variable is set to 0 in /etc/conf.d/foldingathome.
The code that does that is the following:
if [ -z "${CPU}" ] || [ "${CPU}" == "0" ]; then
if [ -r /proc/cpuinfo ]; then
CPU=`grep processor </proc/cpuinfo | wc -l`
else
CPU=1
fi
fi
The problem is, however, the word 'processor' can appear in different places.
Consider the following output I get by running the command manually:
# grep processor </proc/cpuinfo
processor : 0
model name : AMD Athlon(tm) processor
Here, I only have a single CPU, but the script determines I have two. I
suggest revising the script as follows:
replace
CPU=`grep processor </proc/cpuinfo | wc -l`
with
CPU=`grep "^processor.*:" /proc/cpuinfo | wc -l`
This way, the pattern matched is restricted to lines starting with the word
processor, followed by some number of characters, followed by a colon.
Thanks,
Andy Dalton