the defect 2847578 is fixed; one retry_number is added to avoid the infinit loop

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4144 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
mxi1 2009-09-16 08:28:04 +00:00
parent 9076c195d1
commit 13e2425112

View File

@ -99,7 +99,17 @@ chmod +x /xcatpost/*;
/xcatpost/getpostscript.awk | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /tmp/mypostscript;
MYCONT=`grep MASTER /tmp/mypostscript`
#echo "MYCONT=$MYCONT"
#if getpostscript.awk fails, the postscript will fall into infinit loop
#so one retry_number is added to avoid sunc a condition
MAX_RETRIES=10
RETRY=0
while [ -z "$MYCONT" ]; do
RETRY=$(($RETRY+1))
if [ $RETRY -eq $MAX_RETRIES ]
then
break
fi
let SLI=$RANDOM%10
let SLI=10+$SLI
sleep $SLI