updatenode performance enhancement.1. get the /postscripts.tgz firstly, if fails, try the original procedure; 2, remove the sleep() action in xcatdsklspost script, because Jarrod did some enhancement in xcatd
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13626 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
fcf725f88d
commit
82719795ef
@ -48,11 +48,19 @@ download_postscripts()
|
||||
retry=0
|
||||
rc=1
|
||||
while [ 0 -eq 0 ]; do
|
||||
wget -l inf -nH -N -r --waitretry=10 --random-wait -T 60 -nH --cut-dirs=2 --reject "index.html*" --no-parent http://$server$INSTALLDIR/postscripts/ -P /xcatpost 2> /tmp/wget.log
|
||||
|
||||
wget -N --waitretry=10 --random-wait -T 60 http://$server$INSTALLDIR/postscripts.tgz -P /xcatpost 2> /tmp/wget.log
|
||||
rc=$?
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
return 0;
|
||||
else
|
||||
wget -l inf -nH -N -r --waitretry=10 --random-wait -T 60 -nH --cut-dirs=2 --reject "index.html*" --no-parent http://$server$INSTALLDIR/postscripts/ -P /xcatpost 2> /tmp/wget.log
|
||||
rc=$?
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
return 0;
|
||||
fi
|
||||
fi
|
||||
|
||||
retry=$(($retry+1))
|
||||
@ -99,8 +107,8 @@ if [ ! `uname` = Linux ]; then
|
||||
exec $MYDIR/xcatdsklspost.aix
|
||||
exit
|
||||
fi
|
||||
SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*10)}')
|
||||
sleep $SLI
|
||||
#SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*10)}')
|
||||
#sleep $SLI
|
||||
|
||||
if [ ! -d /xcatpost ]; then
|
||||
mkdir -p /xcatpost;
|
||||
@ -243,6 +251,10 @@ if grep 'rw /rw tmpfs ' /proc/mounts >/dev/null 2>&1; then
|
||||
ln -sf /etc/rc6.d/K10xcatmounts /etc/rc0.d/K10xcatmounts
|
||||
fi
|
||||
|
||||
if [ -f /xcatpost/postscripts.tgz ]; then
|
||||
tar xzf /xcatpost/postscripts.tgz -C /xcatpost/ 2>/dev/null
|
||||
fi
|
||||
|
||||
chmod +x /xcatpost/*;
|
||||
|
||||
cd /xcatpost;
|
||||
@ -270,9 +282,9 @@ while [ -z "$MYCONT" ]; do
|
||||
break
|
||||
fi
|
||||
|
||||
SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*10)}')
|
||||
SLI=$((10 + $SLI))
|
||||
sleep $SLI
|
||||
#SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*10)}')
|
||||
#SLI=$((10 + $SLI))
|
||||
#sleep $SLI
|
||||
|
||||
/xcatpost/getpostscript.awk | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed -e 's/^ *//' > /xcatpost/mypostscript;
|
||||
MYCONT=`grep MASTER /xcatpost/mypostscript`
|
||||
|
Loading…
Reference in New Issue
Block a user