This version is also detecting CPUs on Solaris.

This commit is contained in:
Louwrentius 2009-10-21 21:23:36 +00:00
parent 82955ab7ed
commit 1253d66a45
1 changed files with 3 additions and 2 deletions

View File

@ -587,8 +587,9 @@ init_vars () {
log INFO "CPU: $MODEL $SPEED" log INFO "CPU: $MODEL $SPEED"
elif [ "$ARCH" == "SunOS" ] elif [ "$ARCH" == "SunOS" ]
then then
CPU=`psrinfo -v | grep MHz | cut -d " " -f 4,8 | awk '{ printf ("Processor architecture: %s @ %s MHz.\n", $1,$2) }'` CPU=`psrinfo -v | grep MHz | cut -d " " -f 4,8 | awk '{ printf ("Processor architecture: %s @ %s MHz.\n", $1,$2) }' | head -n 1`
log INFO "CPU: $CPU"
log INFO "$CPU"
else else
log INFO "CPU: Cannot determine. Provide a patch for your arch!" log INFO "CPU: Cannot determine. Provide a patch for your arch!"
log INFO "Arch is $ARCH" log INFO "Arch is $ARCH"