[ewg] [PATCH] OFED/scripts - Not all systems create a ".pc" file

Ralph Campbell ralph.campbell at qlogic.com
Thu Nov 1 18:45:25 PDT 2007


The ofed_makedist.sh assumes that a ".pc" file is created and at least
on the Fedora Core 6 system, this is not true.  This patch checks
to see if the file is present before attempting to chmod it.

This can be pulled from git://git.openfabrics.org/~ralphc/linux-2.6/.git
    
Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>

diff --git a/ofed_scripts/ofed_makedist.sh b/ofed_scripts/ofed_makedist.sh
index 907f9fd..e5f661f 100755
--- a/ofed_scripts/ofed_makedist.sh
+++ b/ofed_scripts/ofed_makedist.sh
@@ -50,8 +50,11 @@ do
         $CWD/ofed_scripts/ofed_patch.sh --with-backport=$backport
 	#Some QUILT versions create files with 0 permissions
 	#work around this
-	ex "" chmod -R u+rw .pc
-	ex "" chmod -R o+r .pc
+	if [ -f .pc ]
+	then
+		ex "" chmod -R u+rw .pc
+		ex "" chmod -R o+r .pc
+	fi
 	ex "" cd $tmpdir
 	ex "" tar czf $tmpdir/$project-$backport.tgz $project-$backport
 	ex "" popd





More information about the ewg mailing list