diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-04 00:27:53 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-04 13:16:33 -0400 |
| commit | 608fa75973c111c61cf55e99cf3172ff3f3f00b1 (patch) | |
| tree | fa3b3a3d457dc1daafdefa5c100379bcf3de1928 /meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb | |
| parent | 6806482a7ba6f020b0cff44b2b797eede2b702af (diff) | |
| download | meta-cloud-services-608fa75973c111c61cf55e99cf3172ff3f3f00b1.tar.gz | |
postgresql: unify startup and initialization
Since we can't count on package postinst order, many components check for
a configured postgresql daemon, and if not found, initialize it.
Rather than sprinkling the knowledge of how to initialize the database
through all these packages, we create a more robust, central postgresql-init
script, and call it when any component needs the database configured.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb b/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb index 9bfd262..ff81a0c 100644 --- a/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb +++ b/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb | |||
| @@ -65,10 +65,9 @@ pkg_postinst_${SRCNAME} () { | |||
| 65 | 65 | ||
| 66 | # This is to make sure postgres is configured and running | 66 | # This is to make sure postgres is configured and running |
| 67 | if ! pidof postmaster > /dev/null; then | 67 | if ! pidof postmaster > /dev/null; then |
| 68 | sudo -u postgres initdb -D /etc/postgresql/ | 68 | /etc/init.d/postgresql-init |
| 69 | /etc/init.d/postgresql start | 69 | /etc/init.d/postgresql start |
| 70 | sleep 0.2 | 70 | sleep 5 |
| 71 | sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" | ||
| 72 | fi | 71 | fi |
| 73 | 72 | ||
| 74 | mkdir /var/log/glance | 73 | mkdir /var/log/glance |
