|
1 In-house patch to the heat-keystone-setup script installed in |
|
2 /usr/demo/openstack/keystone in order to use the standard Solaris UNIX |
|
3 commands rather than the GNU ones. It also includes a corrected fix for |
|
4 Launchpad bug 1260556. This is a Solaris-specific patch and is not |
|
5 suitable for the upstream. |
|
6 |
|
7 --- heat-2013.2.3/bin/heat-keystone-setup.~1~ 2014-04-03 11:44:49.000000000 -0700 |
|
8 +++ heat-2013.2.3/bin/heat-keystone-setup 2014-07-16 20:28:16.316132723 -0700 |
|
9 @@ -2,12 +2,14 @@ |
|
10 |
|
11 set +e |
|
12 |
|
13 +PATH=/usr/bin |
|
14 + |
|
15 KEYSTONE_CONF=${KEYSTONE_CONF:-/etc/keystone/keystone.conf} |
|
16 |
|
17 # Extract some info from Keystone's configuration file |
|
18 if [[ -r "$KEYSTONE_CONF" ]]; then |
|
19 - CONFIG_SERVICE_TOKEN=$(sed 's/[[:space:]]//g' $KEYSTONE_CONF | grep ^admin_token= | cut -d'=' -f2) |
|
20 - CONFIG_ADMIN_PORT=$(sed 's/[[:space:]]//g' $KEYSTONE_CONF | grep ^admin_port= | cut -d'=' -f2) |
|
21 + CONFIG_SERVICE_TOKEN=$(tr -d '[\t ]' < $KEYSTONE_CONF | grep ^admin_token= | cut -d'=' -f2) |
|
22 + CONFIG_ADMIN_PORT=$(tr -d '[\t ]' < $KEYSTONE_CONF | grep ^admin_port= | cut -d'=' -f2) |
|
23 fi |
|
24 |
|
25 SERVICE_TOKEN=${SERVICE_TOKEN:-$CONFIG_SERVICE_TOKEN} |
|
26 @@ -35,7 +37,7 @@ |
|
27 shift 3 |
|
28 |
|
29 echo $("$@" | \ |
|
30 - awk -F'|' \ |
|
31 + nawk -F'|' \ |
|
32 "! /^\+/ && \$${match_column} ~ \"^ *${regex} *\$\" \ |
|
33 { print \$${output_column} }") |
|
34 } |
|
35 @@ -47,7 +49,7 @@ |
|
36 get_column_num() { |
|
37 local name=$1 |
|
38 shift |
|
39 - $@ | awk -F'|' "NR == 2 { for (i=2; i<NF; i++) if (\$i ~ \"^ *${name} *\$\") print (i - 1) }" |
|
40 + $@ | nawk -F'|' "/^\|/ { for (i=2; i<NF; i++) if (\$i ~ \"^ *${name} *\$\") print (i - 1); exit }" |
|
41 } |
|
42 |
|
43 get_user() { |
|
44 @@ -137,7 +139,7 @@ |
|
45 |
|
46 local url=$(get_data 1 "${service_type}[.]publicURL" 2 \ |
|
47 get_endpoint $service_type 2>/dev/null | \ |
|
48 - sed -r "s/[a-f0-9]{32}/$urlsuffix/") |
|
49 + sed "s/[a-f0-9]\{32\}/$urlsuffix/") |
|
50 |
|
51 if [ -n "$url" ]; then |
|
52 local endpoints=$(get_data 3 $url 1 keystone endpoint-list) |
|
53 @@ -199,7 +201,7 @@ |
|
54 |
|
55 ADMIN_ROLE=$(get_data 2 admin 1 keystone role-list) |
|
56 SERVICE_TENANT=$(get_data 2 service 1 keystone tenant-list) |
|
57 - SERVICE_PASSWORD=${SERVICE_PASSWORD:-$OS_PASSWORD} |
|
58 + SERVICE_PASSWORD=${SERVICE_PASSWORD:-heat} |
|
59 SERVICE_HOST=${SERVICE_HOST:-localhost} |
|
60 |
|
61 if [[ "$SERVICE_PASSWORD" == "$OS_PASSWORD" ]]; then |