From dd702af4df110c1c22d61d5ce2c83acd4791354c Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Fri, 2 Oct 2020 09:52:37 -0700 Subject: [PATCH] Quote the state value, it may include spaces. This prevents the "./02_verify.sh: line 22: [: too many arguments" error when the state is, for example, "registration error". Issue-ID: ICN-476 Signed-off-by: Todd Malsbary Change-Id: I2228a127e3e4cff56c8689af6fe0accd3e3b3240 --- deploy/metal3/scripts/02_verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/metal3/scripts/02_verify.sh b/deploy/metal3/scripts/02_verify.sh index 09030c1..a6a1023 100755 --- a/deploy/metal3/scripts/02_verify.sh +++ b/deploy/metal3/scripts/02_verify.sh @@ -19,7 +19,7 @@ function check_provisioned { state=$(kubectl get baremetalhosts $name -n metal3 -o json | jq -r '.status.provisioning.state') echo "Baremetal host metal3 state - "$name" : "$state - if [ $state == "provisioned" ];then + if [ "$state" == "provisioned" ];then current_host_state=1 fi -- 2.16.6