Make shell script graceful

When $READY is None, it will raise an ungraceful error called
"== unary operator expected".

Change-Id: I7e263ca2073d0b35134c2e84669066a98415ce04
This commit is contained in:
Guoqiang Ding 2018-02-07 13:49:28 +08:00
parent 075fb85206
commit a229b4f135
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ end=$(($(date +%s) + 600))
READY="False"
while true; do
READY=$(kubectl get nodes --no-headers=true | awk "{ print \$2 }" | head -1)
[ $READY == "Ready" ] && break || true
[ "$READY" == "Ready" ] && break || true
sleep 1
now=$(date +%s)
[ $now -gt $end ] && \