diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-06-02 10:20:26 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-06-02 10:20:26 -0700 |
| commit | be2f5e986e41f8f8d63c0ef7a5c03916c70ba455 (patch) | |
| tree | 012a30d717169cda7fe3739514a7ceaf11686f18 | |
| parent | 8ee41f679bd72af6aab098f9d9735e342b281635 (diff) | |
| download | nova-be2f5e986e41f8f8d63c0ef7a5c03916c70ba455.tar.gz nova-be2f5e986e41f8f8d63c0ef7a5c03916c70ba455.tar.xz nova-be2f5e986e41f8f8d63c0ef7a5c03916c70ba455.zip | |
don't use python if readlink is available
| -rw-r--r-- | nova/auth/novarc.template | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/auth/novarc.template b/nova/auth/novarc.template index 92eed3520..d30bd849c 100644 --- a/nova/auth/novarc.template +++ b/nova/auth/novarc.template @@ -1,5 +1,6 @@ -NOVARC=$(python -c 'import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))' ${BASH_SOURCE:-$0}) -NOVA_KEY_DIR=$(dirname ${NOVARC}) +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" |
