aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-cinder_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-cinder_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb48
1 files changed, 23 insertions, 25 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
index e70a3aad..9f70bebb 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
@@ -124,31 +124,29 @@ do_install_append() {
}
pkg_postinst_${SRCNAME}-setup () {
- if [ "x$D" != "x" ]; then
- exit 1
- fi
-
- # This is to make sure postgres is configured and running
- if ! pidof postmaster > /dev/null; then
- /etc/init.d/postgresql-init
- /etc/init.d/postgresql start
- fi
-
- if [ ! -d /var/log/cinder ]; then
- mkdir /var/log/cinder
- fi
-
- sudo -u postgres createdb cinder
- cinder-manage db sync
-
- # Create Cinder nfs_share config file with default nfs server
- if [ ! -f /etc/cinder/nfs_shares ]; then
- /bin/bash /etc/cinder/drivers/nfs_setup.sh
- fi
-
- # Create Cinder glusterfs_share config file with default glusterfs server
- if [ ! -f /etc/cinder/glusterfs_shares ] && [ -f /usr/sbin/glusterfsd ]; then
- /bin/bash /etc/cinder/drivers/glusterfs_setup.sh
+ if [ -z "$D" ]; then
+ # This is to make sure postgres is configured and running
+ if ! pidof postmaster > /dev/null; then
+ /etc/init.d/postgresql-init
+ /etc/init.d/postgresql start
+ fi
+
+ if [ ! -d /var/log/cinder ]; then
+ mkdir /var/log/cinder
+ fi
+
+ sudo -u postgres createdb cinder
+ cinder-manage db sync
+
+ # Create Cinder nfs_share config file with default nfs server
+ if [ ! -f /etc/cinder/nfs_shares ]; then
+ /bin/bash /etc/cinder/drivers/nfs_setup.sh
+ fi
+
+ # Create Cinder glusterfs_share config file with default glusterfs server
+ if [ ! -f /etc/cinder/glusterfs_shares ] && [ -f /usr/sbin/glusterfsd ]; then
+ /bin/bash /etc/cinder/drivers/glusterfs_setup.sh
+ fi
fi
}