From 9c60a81d8a9ced7f9266602bc8a53b5ff226f661 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:57:20 +0200 Subject: [PATCH] decrease first, last number is unused Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index b78c032b..3d497436 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -53,14 +53,14 @@ done # else wait after all are started if [ "$parallel" ]; then __cdist_echo info "Waiting for cdist-deploy-to jobs to finish" - while [ "$i" -gt 0 ]; do + while [ "$i" -ge 0 ]; do + i=$((i-1)) eval pid=\$pid_$i eval host=\$host_$i wait "$pid" if [ $? -ne 0 ]; then __cdist_echo error "Configuration of host $host failed." fi - i=$((i-1)) shift done fi