fix bug for configure-kubernetes-minion.sh

In the sh scrip file used tr -s "v3" "v2" may be incorrect.
The command tr will replace "v3" to "v2" only a character one by one,
like "v" to "v","3" to "2", not the whole string "v3" to "v2".
So use sed 's/v3/v2/'.

Change-Id: I12deb2cf5d19fbe1670cd6d922884e78f0b27137
Closes-Bug: #1605041
This commit is contained in:
huang.huayong 2016-07-21 12:06:38 +08:00
parent d15d438b20
commit fb8425e954
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ if [ "$VOLUME_DRIVER" = "cinder" ]; then
if [ ! -d ${KUBERNETES} -o ! -f ${CLOUD_CONFIG} ]; then
sudo mkdir -p $KUBERNETES
fi
AUTH_URL=$(echo "$AUTH_URL" | tr -s "v3" "v2")
AUTH_URL=$(echo "$AUTH_URL" | sed 's/v3/v2/')
cat > $CLOUD_CONFIG <<EOF
[Global]
auth-url=$AUTH_URL

View File

@ -58,7 +58,7 @@ if [ "$VOLUME_DRIVER" = "cinder" ]; then
if [ ! -d ${KUBERNETES} -o ! -f ${CLOUD_CONFIG} ]; then
sudo mkdir -p $KUBERNETES
fi
AUTH_URL=$(echo "$AUTH_URL" | tr -s "v3" "v2")
AUTH_URL=$(echo "$AUTH_URL" | sed 's/v3/v2/')
cat > $CLOUD_CONFIG <<EOF
[Global]
auth-url=$AUTH_URL