summaryrefslogtreecommitdiffstats
path: root/tools/keystone
diff options
context:
space:
mode:
authorDimitri Mazmanov <dimitri.mazmanov@ericsson.com>2017-01-31 13:24:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-31 13:24:51 +0000
commitc63196c237d80336bf2731038396033ef0dbe3b4 (patch)
treef7bd6414a187d04554c4d9f807a0d6570c2a082b /tools/keystone
parent0b33edd785120ca8d5947d4678ff4ebcb048f7b1 (diff)
parent80b2b33036e3afe41ad0573f9ca7cf6af38cf767 (diff)
Merge "extract filename"
Diffstat (limited to 'tools/keystone')
-rwxr-xr-xtools/keystone/endpoint.sh2
-rwxr-xr-xtools/keystone/run.sh3
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/keystone/endpoint.sh b/tools/keystone/endpoint.sh
index aae851d..dd2aeae 100755
--- a/tools/keystone/endpoint.sh
+++ b/tools/keystone/endpoint.sh
@@ -24,7 +24,7 @@ ENDPOINT_PUBLIC_URL=$(openstack endpoint list | grep keystone | grep public | cu
ENDPOINT_ADMIN_URL=$(openstack endpoint list | grep keystone | grep admin | cut -d '|' -f 8 | cut -d '/' -f 3 | cut -d ':' -f 1)
ENDPOINT_INTERNAL_URL=$(openstack endpoint list | grep keystone | grep internal | cut -d '|' -f 8 | cut -d '/' -f 3 | cut -d ':' -f 1)
-cat <<EOT >> ${ENDPOINT_FILE}
+cat > ${ENDPOINT_FILE} <<EOT
[DEFAULT]
public_url=${ENDPOINT_PUBLIC_URL}
admin_url=${ENDPOINT_ADMIN_URL}
diff --git a/tools/keystone/run.sh b/tools/keystone/run.sh
index 6ece634..11c6773 100755
--- a/tools/keystone/run.sh
+++ b/tools/keystone/run.sh
@@ -79,8 +79,9 @@ function run_on_target() {
"ssh $ssh_options $1 \"cd /root/ && cat > ${runnable}\"" < ${runnable} &> /dev/null
if [ -n "${data}" ]; then
# Copy any accompanying data along with the script
+ fname=$(basename ${data})
sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \
- "ssh $ssh_options $1 \"cd /root/ && cat > $(basename ${data})\"" < ${data} &> /dev/null
+ "ssh $ssh_options $1 \"cd /root/ && cat > ${fname}\"" < ${data} &> /dev/null
fi
# Set the rights and execute
sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \