From d8853d7f203656c2f8aa5a9972d63de1ae7bb4c7 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sat, 11 Sep 1999 22:54:33 +0000 Subject: fix for number of processor check. This should work and be portable. --- rc.d/rc.local | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc.d/rc.local b/rc.d/rc.local index 5e60998b..fcfe0e7a 100755 --- a/rc.d/rc.local +++ b/rc.d/rc.local @@ -1,5 +1,5 @@ #!/bin/sh - +# # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. @@ -14,8 +14,8 @@ if [ -f /etc/redhat-release ]; then _i*) a="an";; esac - NUMPROC=$[`cat /proc/cpuinfo | grep -i ^bogomips | wc -l`] - if [ $NUMPROC -gt 1 ]; then + NUMPROC=`grep -cl "^cpu[0-9]+" /proc/stat` + if [ "$NUMPROC" -gt "1" ]; then SMP="$NUMPROC-processor " if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then a="an" -- cgit v1.2.1