From 4e2919cbabf1099ebeb4fabfe7678be5fa78649c Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 29 Dec 2011 10:32:29 +0000 Subject: [PATCH] add try for the syncfiles postscript git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11314 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/syncfiles | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/xCAT/postscripts/syncfiles b/xCAT/postscripts/syncfiles index 0c61d5923..9fd0c50b8 100644 --- a/xCAT/postscripts/syncfiles +++ b/xCAT/postscripts/syncfiles @@ -28,15 +28,28 @@ osname=`uname` xcatpostdir="/xcatpost" logger -t xCAT "$0: the OS name = $osname" -if [ $osname = "Linux" ] -then -`$xcatpostdir/startsyncfiles.awk` -returncode=$? -elif [ $osname = "AIX" ] -then -`$xcatpostdir/startsyncfiles.aix` -returncode=$? -fi +quit="no" +count=5 +while [ $quit = "no" ]; do + if [ $osname = "Linux" ] + then + `$xcatpostdir/startsyncfiles.awk` + returncode=$? + elif [ $osname = "AIX" ] + then + `$xcatpostdir/startsyncfiles.aix` + returncode=$? + fi + + if [ $returncode -eq 0 ] || [ $count -eq 0 ]; then + quit="yes" + else + let SLI=$RANDOM%10 + let SLI=SLI+10 + sleep $SLI + fi + let count=count-1 +done if [ $returncode -eq 0 ] then