Whamcloud - gitweb
More HP patch merging; part of misc_sfs_build_changes.patch
[fs/lustre-release.git] / build / lustre.spec.in
index eeeae23..6904395 100644 (file)
@@ -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