diff options
author | Mihai Prica <prica.mihai@gmail.com> | 2013-06-27 14:21:35 +0300 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:57 -0400 |
commit | ba59b821b9de3136b890ae59dcd8e8f818304ac6 (patch) | |
tree | d3fdee54cb4d0a45705c88ea8bb67e3d25732457 /meta-openstack | |
parent | a3e24ede8400672b809ce31c22ae8b3fc6fe1eb6 (diff) | |
download | meta-cloud-services-ba59b821b9de3136b890ae59dcd8e8f818304ac6.tar.gz |
python-cinder: Initialize postgresql before postinstall
This is necessary because the postinstalls are run in alphabetical order.
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | 8 |
1 files changed, 6 insertions, 2 deletions
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} () { | |||
43 | exit 1 | 43 | exit 1 |
44 | fi | 44 | fi |
45 | 45 | ||
46 | # quick fix | 46 | if ! pidof postmaster > /dev/null; then |
47 | /etc/rpm-postinsts/postgresql | 47 | sudo -u postgres initdb -D /etc/postgresql/ |
48 | /etc/init.d/postgresql start | ||
49 | sleep 0.5 | ||
50 | sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" | ||
51 | fi | ||
48 | 52 | ||
49 | sudo -u postgres createdb cinder | 53 | sudo -u postgres createdb cinder |
50 | cinder-manage db sync | 54 | cinder-manage db sync |