aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-09-11 22:54:33 +0000
committerBill Nottingham <notting@redhat.com>1999-09-11 22:54:33 +0000
commitd8853d7f203656c2f8aa5a9972d63de1ae7bb4c7 (patch)
tree1e8ddb53595b34abf227eb94cda05a917b11950a /rc.d
parent467174a0f8a4ec461031aca79d7b7ac8f47aa72f (diff)
downloadinitscripts-d8853d7f203656c2f8aa5a9972d63de1ae7bb4c7.tar
initscripts-d8853d7f203656c2f8aa5a9972d63de1ae7bb4c7.tar.gz
initscripts-d8853d7f203656c2f8aa5a9972d63de1ae7bb4c7.tar.bz2
initscripts-d8853d7f203656c2f8aa5a9972d63de1ae7bb4c7.tar.xz
initscripts-d8853d7f203656c2f8aa5a9972d63de1ae7bb4c7.zip
fix for number of processor check. This should work and be portable.
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.local6
1 files 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"