diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 3ddb7795a..65a17bed7 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -96,7 +96,7 @@ download_mypostscript() while [ 0 -eq 0 ]; do - wget -N --waitretry=10 --random-wait -T 60 http://$server$TFTPDIR/mypostscripts/mypostscript.$node -P /xcatpost 2> /tmp/wget.log + wget -N --waitretry=10 --random-wait -T 60 http://$server$TFTPDIR/mypostscripts/mypostscript.$node -P /xcatpost 2>> /tmp/wget.log rc=$? if [ $rc -eq 0 ]; then @@ -109,8 +109,8 @@ download_mypostscript() break fi - SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*5)}') - sleep $SLI + #SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*5)}') + #sleep $SLI done return $rc } @@ -332,7 +332,16 @@ fi if [ ! -x /xcatpost/mypostscript ]; then -/xcatpost/getpostscript.awk | egrep '' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript; +#/xcatpost/getpostscript.awk | egrep '' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript; +/xcatpost/getpostscript.awk > /dev/null +node=`hostname` +echo "$node\n" +wget -N --waitretry=10 --random-wait -T 60 http://$server$TFTPDIR/mypostscripts/mypostscript.$node -P /xcatpost 2>> /tmp/wget.log +rc=$? +if [ $rc -eq 0 ]; then + mv /xcatpost/mypostscript.$node /xcatpost/mypostscript +fi + MYCONT=`grep MASTER /xcatpost/mypostscript` #echo "MYCONT=$MYCONT" #if getpostscript.awk fails, the postscript will fall into infinit loop @@ -353,7 +362,14 @@ while [ -z "$MYCONT" ]; do #SLI=$((10 + $SLI)) #sleep $SLI - /xcatpost/getpostscript.awk | egrep '' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript; + #/xcatpost/getpostscript.awk | egrep '' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript; + /xcatpost/getpostscript.awk > /dev/null + wget -N --waitretry=10 --random-wait -T 60 http://$server$TFTPDIR/mypostscripts/mypostscript.$node -P /xcatpost 2>> /tmp/wget.log + rc=$? + if [ $rc -eq 0 ]; then + mv /xcatpost/mypostscript.$node /xcatpost/mypostscript + fi + MYCONT=`grep MASTER /xcatpost/mypostscript` if [ ! -z "$MYCONT" ]; then break;