From 2defbdf3d84d044f841ebb5e6695fdaee40b922d Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Sun, 15 Sep 2013 21:50:54 -0400 Subject: nova-common: adapt to non /home/root directory structures /home/root was hardcoded as the location for root's .bashrc. With this change we'll update .bashrc in /home/root or /root. We also add the $D prefix to the paths, to ensure there is no chance of clobbering the build machines /root/.bashrc. Signed-off-by: Bruce Ashfield --- meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb b/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb index bd54d4e..e7f844a 100644 --- a/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb +++ b/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb @@ -7,7 +7,11 @@ pkg_postinst_${SRCNAME}-common () { exit 1 fi - echo "source /etc/nova/openrc" > /home/root/.bashrc + if [ -d $D/home/root/ ]; then + echo "source /etc/nova/openrc" >> $D/home/root/.bashrc + elif [ -d $D/root/ ]; then + echo "source /etc/nova/openrc" >> $D/root/.bashrc + fi } PACKAGES += "${SRCNAME}-common ${SRCNAME}-common-misc" -- cgit v1.2.3-54-g00ecf