defect 3612: add one line to handle variable like in the runimage; And added the checking code logic to display error message if wget failed

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16592 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2013-06-09 09:13:03 +00:00
parent afa886e729
commit 8ffc45d9cb

View File

@ -149,10 +149,21 @@ while :; do
dest=`echo $destiny|awk -F= '{print $1}'`
mkdir /tmp/`basename $destparameter`
cd /tmp/`basename $destparameter`
eval destparameter=$destparameter
ERROR=`wget $destparameter 2>&1`
while [ $? == 1 ] && echo $ERROR|grep -v 416; do
rc=$?
if [ $rc -ne 0 ]; then
echo "Failed to wget $destparameter"
echo $ERROR
fi
while [ $rc -ne 0 ] && echo $ERROR|grep -v 416; do
sleep 10
ERROR=`wget -c $destparameter 2>&1`
rc=$?
if [ $rc -ne 0 ]; then
echo "Failed to wget $destparameter"
echo $ERROR
fi
done
tar xvf `basename $destparameter`
./runme.sh