From 31a3d7f75c00ffd1aa18707e0f662f66acb3855b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 13 Jul 2015 09:21:35 -0600 Subject: [PATCH] Minor update to devstack build script Upstream stack.sh again changed its output slightly, so autostack.sh needs a corresponding change so that it knows when stack.sh completes. Change-Id: If10c17392af98e4ac6c814df145fe2d2e9f6bc6c --- ds-build/roles/devstack-build/files/autostack.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ds-build/roles/devstack-build/files/autostack.sh b/ds-build/roles/devstack-build/files/autostack.sh index 1cddf3f..42ba96e 100755 --- a/ds-build/roles/devstack-build/files/autostack.sh +++ b/ds-build/roles/devstack-build/files/autostack.sh @@ -38,15 +38,15 @@ echo "Running stack.sh (this will take a while, output in $log)" su $unpriv_user -c $basedir/devstack/stack.sh 2>&1 & # Wait for stack.sh to complete by watching the log file for $donestring -donestring='This is your host ip' +donestring='This is your host IP' # Sometimes, 'git clone' fails, and this can be retried retrystring='git call failed: \[git clone' success=0 while [ "$success" = 0 ]; do - if [ `tail -5 $log 2>/dev/null |grep -c "$donestring"` = 1 ]; then + if [ `tail -6 $log 2>/dev/null |grep -c "$donestring"` -gt 0 ]; then success=1 - elif [ `tail -2 $log 2>/dev/null |grep -c "$retrystring"` = 1 ]; then + elif [ `tail -2 $log 2>/dev/null |grep -c "$retrystring"` -gt 0 ]; then pkill -f devstack/stack.sh su $unpriv_user -c $basedir/devstack/stack.sh 2>&1 & fi