From 8be1d5385f2f4eb85ffc46db73f964428563af8e Mon Sep 17 00:00:00 2001 From: Mihai Prica Date: Thu, 4 Jul 2013 17:36:19 +0300 Subject: python-glance: Create log directory in initscript Signed-off-by: Mihai Prica --- meta-openstack/recipes-devtools/python/python-glance_2013.1.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'meta-openstack/recipes-devtools/python/python-glance_2013.1.bb') diff --git a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb index 99d1577..a64ac9e 100644 --- a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb +++ b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb @@ -58,7 +58,14 @@ pkg_postinst_${SRCNAME} () { exit 1 fi - mkdir /var/log/glance + # This is to make sure postgres is configured and running + 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 + # Needed when using a MySQL backend # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;" sudo -u postgres createdb glance -- cgit v1.2.3-54-g00ecf