From 18ff1d459edf5a6d42d213fb3f5cf1b19f1a7b3d Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 31 Oct 2006 15:36:53 +0100 Subject: [PATCH 1/1] config_cpu: beautify "Detecting CPU" for SMP systems. --- autoconfig.functions | 9 ++++++++- debian/changelog | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/autoconfig.functions b/autoconfig.functions index fa5dd55..dbe9d63 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1171,7 +1171,14 @@ else elif [ ! -e /lib/modules/${KERNEL}/kernel/arch/i386/kernel/cpu/cpufreq -o ! -e /lib/modules/${KERNEL}/kernel/drivers/cpufreq ] ; then ewarn "Skipping CPU detection as module dependencies are not fulfilled." ; eend 1 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 + 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() { diff --git a/debian/changelog b/debian/changelog index bfa2afb..9336e2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +grml-autoconfig (0.5-18) unstable; urgency=low + + * config_cpu: beautify "Detecting CPU" for SMP systems. + + -- Michael Prokop Tue, 31 Oct 2006 15:36:18 +0100 + grml-autoconfig (0.5-17) unstable; urgency=low * config_mixer: beautify error output of aumix. -- 2.1.4