From 27c5d2ca9e2ff88dc1034896074d537dc248c500 Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 1 Mar 2005 01:12:36 +0000 Subject: [PATCH] More HP patch merging; part of misc_sfs_build_changes.patch b=5785 Info: Also correct a logic bug in the number of cpus calculation which can lead to a shell error if the egrep fails and thus reports no output. --- build/lustre.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lustre.spec.in b/build/lustre.spec.in index eeeae23..6904395 100644 --- a/build/lustre.spec.in +++ b/build/lustre.spec.in @@ -73,7 +73,7 @@ Configures openldap server for LDAP Lustre config database %build # if RPM_BUILD_NCPUS unset, set it if [ -z "$RPM_BUILD_NCPUS" ] ; then - RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat || :) + RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat 2>/dev/null || echo 0 :) if [ $RPM_BUILD_NCPUS -eq 0 ] ; then RPM_BUILD_NCPUS=1 fi -- 1.8.3.1