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
This commit is contained in:
Roger Luethi 2015-07-25 21:09:42 +02:00
parent d474121caa
commit 18830c3b45
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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