for linux diskless, make getpostscript.awk use the template method, instad of the original method
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14397 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
8974b775a6
commit
c72e01429a
@ -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 '<data>' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript;
|
||||
#/xcatpost/getpostscript.awk | egrep '<data>' | 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 '<data>' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript;
|
||||
#/xcatpost/getpostscript.awk | egrep '<data>' | 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user