diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova_git.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova_git.bb | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb index f3a6b86..7b560a7 100644 --- a/meta-openstack/recipes-devtools/python/python-nova_git.bb +++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb | |||
| @@ -160,33 +160,29 @@ do_install_append() { | |||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | pkg_postinst_${SRCNAME}-setup () { | 162 | pkg_postinst_${SRCNAME}-setup () { |
| 163 | if [ "x$D" != "x" ]; then | 163 | if [ -z "$D" ]; then |
| 164 | exit 1 | 164 | # This is to make sure postgres is configured and running |
| 165 | if ! pidof postmaster > /dev/null; then | ||
| 166 | /etc/init.d/postgresql-init | ||
| 167 | /etc/init.d/postgresql start | ||
| 168 | sleep 5 | ||
| 169 | fi | ||
| 170 | |||
| 171 | sudo -u postgres createdb nova | ||
| 172 | sleep 2 | ||
| 173 | nova-manage db sync | ||
| 165 | fi | 174 | fi |
| 166 | |||
| 167 | # This is to make sure postgres is configured and running | ||
| 168 | if ! pidof postmaster > /dev/null; then | ||
| 169 | /etc/init.d/postgresql-init | ||
| 170 | /etc/init.d/postgresql start | ||
| 171 | sleep 5 | ||
| 172 | fi | ||
| 173 | |||
| 174 | sudo -u postgres createdb nova | ||
| 175 | sleep 2 | ||
| 176 | nova-manage db sync | ||
| 177 | } | 175 | } |
| 178 | 176 | ||
| 179 | pkg_postinst_${SRCNAME}-common () { | 177 | pkg_postinst_${SRCNAME}-common () { |
| 180 | if [ "x$D" != "x" ]; then | 178 | if [ -z "$D" ]; then |
| 181 | exit 1 | 179 | if [ -d /home/root ]; then |
| 182 | fi | 180 | echo "source /etc/nova/openrc" >> /home/root/.bashrc |
| 183 | 181 | echo "source /etc/nova/openrc" >> /home/root/.profile | |
| 184 | if [ -d /home/root ]; then | 182 | else |
| 185 | echo "source /etc/nova/openrc" >> /home/root/.bashrc | 183 | echo "source /etc/nova/openrc" >> /root/.bashrc |
| 186 | echo "source /etc/nova/openrc" >> /home/root/.profile | 184 | echo "source /etc/nova/openrc" >> /root/.profile |
| 187 | else | 185 | fi |
| 188 | echo "source /etc/nova/openrc" >> /root/.bashrc | ||
| 189 | echo "source /etc/nova/openrc" >> /root/.profile | ||
| 190 | fi | 186 | fi |
| 191 | } | 187 | } |
| 192 | 188 | ||
