From 834c13e4ab7683a62b43d3b1109faf8ae0344b7b Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Fri, 8 Jun 2012 11:24:04 +0200 Subject: [PATCH] Make heat-keystone-service a tad more robust The ADMIN_ROLE extraction failed when the column with the role names was centered instead of left-aligned. Change-Id: If39292b65dfce5fa820396e49e72fc635c2cb0c2 --- tools/heat-keystone-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/heat-keystone-service b/tools/heat-keystone-service index 24075387a7..53319a0ed2 100755 --- a/tools/heat-keystone-service +++ b/tools/heat-keystone-service @@ -22,7 +22,7 @@ if [[ -z "$SERVICE_TOKEN" ]]; then exit 1 fi -ADMIN_ROLE=$(keystone role-list | awk -F\| '($3 ~ "^ admin *$") { print $2 }') +ADMIN_ROLE=$(keystone role-list | grep '\badmin\b' | awk '{ print $2 }') SERVICE_TENANT=$(keystone tenant-list | grep service | cut -d\| -f2) SERVICE_PASSWORD=${SERVICE_PASSWORD:-$OS_PASSWORD} if [[ "$SERVICE_PASSWORD" == "$OS_PASSWORD" ]]; then