diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-glance_2013.1.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-glance_2013.1.bb | 9 |
1 files changed, 8 insertions, 1 deletions
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} () { | |||
| 58 | exit 1 | 58 | exit 1 |
| 59 | fi | 59 | fi |
| 60 | 60 | ||
| 61 | mkdir /var/log/glance | 61 | # This is to make sure postgres is configured and running |
| 62 | if ! pidof postmaster > /dev/null; then | ||
| 63 | sudo -u postgres initdb -D /etc/postgresql/ | ||
| 64 | /etc/init.d/postgresql start | ||
| 65 | sleep 0.5 | ||
| 66 | sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" | ||
| 67 | fi | ||
| 68 | |||
| 62 | # Needed when using a MySQL backend | 69 | # Needed when using a MySQL backend |
| 63 | # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;" | 70 | # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;" |
| 64 | sudo -u postgres createdb glance | 71 | sudo -u postgres createdb glance |
