- if [[ `grep -c processor /proc/cpuinfo` -gt 1 ]] ; then
- einfo "Detecting CPU:"
- CPU=$(awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG)
- echo $CPU | sed 's/ \{1,\}/ /g'
- eend 0
- else
- einfo "Detecting CPU: `awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG` " ; eend 0
- fi
- if /usr/sbin/laptop-detect ; then
- einfo "Detected Laptop - trying to use cpu frequency scaling:"
-# loadcpumod() {
-# for module in /lib/modules/${KERNEL}/kernel/arch/i386/kernel/cpu/cpufreq/*.ko /lib/modules/${KERNEL}/kernel/drivers/cpufreq/*.ko ; do
-# # modprobe ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l | grep cpufreq 2>>$DEBUG)"}:#}##*/}%.*}
-# modprobe `basename ${module%%\.ko}` 1>>$DEBUG 2>&1
-# done
-# }
-# CPU=$(grep 'model name' /proc/cpuinfo | cut -b14- | head -1)
-# eindent
-# if [[ $CPU = *Intel* ]] ; then
-# einfo "Detected CPU is of type Intel - loading modules and starting cpudyn."
-# local DETECTED=1
-# loadcpumod
-# /etc/init.d/cpudyn start 1>>$DEBUG ; eend $?
-# fi
-# if [[ $CPU = *AMD* ]] ; then
-# einfo "Detected CPU is of type AMD - loading modules and starting powernowd."
-# local DETECTED=1
-# loadcpumod
-# /etc/init.d/powernowd start 1>>$DEBUG ; eend $?
-# fi
+ einfo "Detecting CPU: `awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG` " ; eend 0
+ fi