From 8ffc45d9cb1a4131dd0a9bea3277a8c05d7d7505 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Sun, 9 Jun 2013 09:13:03 +0000 Subject: [PATCH] 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 --- xCAT-genesis-scripts/bin/doxcat | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xCAT-genesis-scripts/bin/doxcat b/xCAT-genesis-scripts/bin/doxcat index ee9a51a03..1b730aaf2 100755 --- a/xCAT-genesis-scripts/bin/doxcat +++ b/xCAT-genesis-scripts/bin/doxcat @@ -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