From ba59b821b9de3136b890ae59dcd8e8f818304ac6 Mon Sep 17 00:00:00 2001 From: Mihai Prica Date: Thu, 27 Jun 2013 14:21:35 +0300 Subject: python-cinder: Initialize postgresql before postinstall This is necessary because the postinstalls are run in alphabetical order. Signed-off-by: Mihai Prica --- meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'meta-openstack') diff --git a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb index 54edc47..c1d7beb 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb @@ -43,8 +43,12 @@ pkg_postinst_${SRCNAME} () { exit 1 fi - # quick fix - /etc/rpm-postinsts/postgresql + if ! pidof postmaster > /dev/null; then + sudo -u postgres initdb -D /etc/postgresql/ + /etc/init.d/postgresql start + sleep 0.5 + sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" + fi sudo -u postgres createdb cinder cinder-manage db sync -- cgit v1.2.3-54-g00ecf