aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_git.bb42
1 files changed, 19 insertions, 23 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb
index f3a6b860..7b560a73 100644
--- a/meta-openstack/recipes-devtools/python/python-nova_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb
@@ -160,33 +160,29 @@ do_install_append() {
}
pkg_postinst_${SRCNAME}-setup () {
- if [ "x$D" != "x" ]; then
- exit 1
+ if [ -z "$D" ]; then
+ # This is to make sure postgres is configured and running
+ if ! pidof postmaster > /dev/null; then
+ /etc/init.d/postgresql-init
+ /etc/init.d/postgresql start
+ sleep 5
+ fi
+
+ sudo -u postgres createdb nova
+ sleep 2
+ nova-manage db sync
fi
-
- # This is to make sure postgres is configured and running
- if ! pidof postmaster > /dev/null; then
- /etc/init.d/postgresql-init
- /etc/init.d/postgresql start
- sleep 5
- fi
-
- sudo -u postgres createdb nova
- sleep 2
- nova-manage db sync
}
pkg_postinst_${SRCNAME}-common () {
- if [ "x$D" != "x" ]; then
- exit 1
- fi
-
- if [ -d /home/root ]; then
- echo "source /etc/nova/openrc" >> /home/root/.bashrc
- echo "source /etc/nova/openrc" >> /home/root/.profile
- else
- echo "source /etc/nova/openrc" >> /root/.bashrc
- echo "source /etc/nova/openrc" >> /root/.profile
+ if [ -z "$D" ]; then
+ if [ -d /home/root ]; then
+ echo "source /etc/nova/openrc" >> /home/root/.bashrc
+ echo "source /etc/nova/openrc" >> /home/root/.profile
+ else
+ echo "source /etc/nova/openrc" >> /root/.bashrc
+ echo "source /etc/nova/openrc" >> /root/.profile
+ fi
fi
}