summaryrefslogtreecommitdiffstats
path: root/nova/auth
diff options
context:
space:
mode:
authorYuriy Taraday <yorik.sar@gmail.com>2011-06-03 11:16:10 +0400
committerYuriy Taraday <yorik.sar@gmail.com>2011-06-03 11:16:10 +0400
commit02138e5e2e3eabe1c59bd03dd9488e5d1fdb38bc (patch)
tree129d698ebff6ed0cc5d44f79dce14826cb5072c4 /nova/auth
parent4d1271821f782d4e11934d69b4ffe3aced6072eb (diff)
parent0fd5e0ca8b2d6f9c081b9c31cca7e4ad27d5141c (diff)
Merged with trunk
Diffstat (limited to 'nova/auth')
-rw-r--r--nova/auth/novarc.template4
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/auth/novarc.template b/nova/auth/novarc.template
index cda2ecc28..eba3a8537 100644
--- a/nova/auth/novarc.template
+++ b/nova/auth/novarc.template
@@ -1,4 +1,6 @@
-NOVA_KEY_DIR=$(pushd $(dirname $BASH_SOURCE)>/dev/null; pwd; popd>/dev/null)
+NOVARC=$(readlink -f "${BASH_SOURCE:-${0}}" 2>/dev/null) ||
+ NOVARC=$(python -c 'import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))' "${BASH_SOURCE:-${0}}")
+NOVA_KEY_DIR=${NOVARC%%/*}
export EC2_ACCESS_KEY="%(access)s:%(project)s"
export EC2_SECRET_KEY="%(secret)s"
export EC2_URL="%(ec2)s"