From 32e9fa1a141bd1b95b2486c790af0318ec5022d6 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Mon, 26 Feb 2018 19:55:42 -0500 Subject: [PATCH] sepia-fog-images: count words in $remaininghosts Signed-off-by: David Galloway --- sepia-fog-images/build/build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sepia-fog-images/build/build b/sepia-fog-images/build/build index 39e86560..1e61e937 100755 --- a/sepia-fog-images/build/build +++ b/sepia-fog-images/build/build @@ -127,7 +127,9 @@ set +e # Set DHCP next-server back to FOG and prep each machine for FOG capturing remaininghosts=$allhosts -while [ "$remaininghosts" != "" ]; do +# Once all the hostnames are removed from $remaininghosts, trailing spaces are all that's left. +# I'm sure there's a cleaner way to compile the list of hostnames above. PRs welcome. +while [[ $(echo $remaininghosts | wc -w) != 0 ]]; do for host in $remaininghosts; do if ssh -q ubuntu@${host}.front.sepia.ceph.com stat /ceph-qa-ready \> /dev/null 2\>\&1; then # Bail if anything fails -- 2.39.5