]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
sepia-fog-images: count words in $remaininghosts 970/head
authorDavid Galloway <dgallowa@redhat.com>
Tue, 27 Feb 2018 00:55:42 +0000 (19:55 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 27 Feb 2018 01:19:47 +0000 (20:19 -0500)
Signed-off-by: David Galloway <dgallowa@redhat.com>
sepia-fog-images/build/build

index 39e865604856aa181c111b2e2339b3cb6d3ecd5b..1e61e937a8eba9bcaa1b1e5377e01fbce7a28618 100755 (executable)
@@ -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