diff --git a/xCAT/postscripts/documulusdiscovery b/xCAT/postscripts/documulusdiscovery index ea12406bc..c3e9d8db7 100755 --- a/xCAT/postscripts/documulusdiscovery +++ b/xCAT/postscripts/documulusdiscovery @@ -1,6 +1,6 @@ #!/bin/bash #this script grabs the switch information, then composes a "findme" request and sends it to MN -#so that the switch can be discovered +#so that the switch can be discovered # TODO: Figure out the master based on the DHCP packet XCATMASTER=$(cat /var/lib/dhcp/dhclient.eth0.leases |grep cumulus-provision-url|tail -1|awk -F/ '{print $3}') @@ -112,20 +112,20 @@ while [ $RETRY -lt $MAX_RETRY ]; do if grep "restart" /tmp/result.socat.out; then DISCOVERED=1 break; - elif grep "processing" /tmp/result.socat.out; then + elif grep "processing" /tmp/result.socat.out; then echo "My findme request is still under processing, do not send new request" logger -s -t $log_label -p local4.info "My findme request is still under processing, do not send new request" sleep 6 elif grep "processed" /tmp/result.socat.out; then echo "Fail to discover me, retry to send findme request 900 seconds later!" logger -s -t $log_label -p local4.info "Fail to discover me, retry to send findme request 900 seconds later" - sleep 900 + sleep 900 break; else echo "no response from $XCATMASTER, wait for 6 seconds" logger -s -t $log_label -p local4.info "no response from $XCATMASTER, wait for 6 seconds" sleep 6 - fi + fi fi ((WAITRETRY=WAITRETRY+1)) done @@ -133,7 +133,7 @@ while [ $RETRY -lt $MAX_RETRY ]; do if [ "$DISCOVERED" = "1" ]; then break fi - + ((RETRY=RETRY+1)) done