Code review comment for lp:~chmouel/nova/lp684657

Revision history for this message
Soren Hansen (soren) wrote :

2010/12/3 Chmouel Boudjnah <email address hidden>:
> === modified file 'nova/auth/novarc.template'
> --- nova/auth/novarc.template   2010-07-15 15:52:11 +0000
> +++ nova/auth/novarc.template   2010-12-03 14:23:53 +0000
> @@ -1,3 +1,5 @@
> +[ -n $BASH_SOURCE ] || BASH_SOURCE=$(readlink -f $0)
> +

This won't work. novarc is sourced, not run as a script, so $0
is "bash" or something like that. What you need is an equivalent
of __file__.

> -alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
> -alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
> +
> +[ -x /usr/bin/ec2-bundle-image ] && E_B_IMG=/usr/bin/ec2-bundle-image || E_B_IMG=/usr/bin/euca-bundle-image
> +[ -x /usr/bin/ec2-upload-image ] && E_U_IMG=/usr/bin/ec2-upload-bundle || E_U_IMG=/usr/bin/euca-upload-bundle
> +
> +alias ${E_B_IMG}="${E_B_IMG} --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
> +alias ${E_U_IMG}="${E_U_IMG} -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"

I'm not sure this is necessary. I've succesfully run euca-*bundle*
without any problems without this fix?

--
Soren Hansen
Ubuntu Developer    http://www.ubuntu.com/
OpenStack Developer http://www.openstack.org/

« Back to merge proposal