From 18830c3b451230482bfbb590910c3495f9a3b999 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Sat, 25 Jul 2015 21:09:42 +0200 Subject: [PATCH] Fix variable increment syntax With bash, the i++ syntax does not quite work the way one might expect. Use POSIX standard syntax instead, consistent with the rest of the code. Change-Id: Ic98ee03290dc46f4cfa1284672e9b4f9052739ef --- labs/scripts/ubuntu/setup_cinder_volumes.sh | 4 ++-- labs/scripts/ubuntu/setup_lbaas_controller.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/labs/scripts/ubuntu/setup_cinder_volumes.sh b/labs/scripts/ubuntu/setup_cinder_volumes.sh index 31672414..a8333e27 100755 --- a/labs/scripts/ubuntu/setup_cinder_volumes.sh +++ b/labs/scripts/ubuntu/setup_cinder_volumes.sh @@ -131,7 +131,7 @@ function check_cinder_services { echo "Cinder services seem to be up and running!" return 0 fi - ((i++)) + i=$((i + 1)) if [[ "$i" -gt "20" ]]; then echo "Error, cinder services are not working as expected." exit 0 @@ -171,7 +171,7 @@ function wait_for_cinder_volume { # The purpose of this method is to resolve cinder-volumes race. return 0 fi - ((i++)) + i=$((i + 1)) if [[ "$i" -gt "20" ]]; then echo "Error creating cinder volume." echo "[Warning]: Debug cinder volumes service on the compute node. diff --git a/labs/scripts/ubuntu/setup_lbaas_controller.sh b/labs/scripts/ubuntu/setup_lbaas_controller.sh index 4ebdbc90..45c2fd4e 100755 --- a/labs/scripts/ubuntu/setup_lbaas_controller.sh +++ b/labs/scripts/ubuntu/setup_lbaas_controller.sh @@ -43,7 +43,7 @@ function check_apache_service { until service apache2 status | grep 'not running'; do sudo service apache2 stop sleep 10 - i ++ + i=$((i + 1)) if [ $i -gt 3 ] then break