From: phil Date: Tue, 1 Mar 2005 01:12:36 +0000 (+0000) Subject: More HP patch merging; part of misc_sfs_build_changes.patch X-Git-Tag: 1.3.4~103 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=27c5d2ca9e2ff88dc1034896074d537dc248c500;p=fs%2Flustre-release.git 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. --- 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