summaryrefslogtreecommitdiff
path: root/openstack/usr/share/openstack/postgres-setup
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-01-16 13:40:07 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-01-22 12:46:30 +0000
commit537e32bdcd6777f1cfecb526b1ffaaf2604eefba (patch)
treeee498193bdf0fee237a0b02f53c042b10b6ab988 /openstack/usr/share/openstack/postgres-setup
parente3c2492c9463d7cd47d06ed4040d8c6c21235313 (diff)
downloaddefinitions-537e32bdcd6777f1cfecb526b1ffaaf2604eefba.tar.gz
FIXUPME: Add workaround to avoid failure on reboot of some setup services
Diffstat (limited to 'openstack/usr/share/openstack/postgres-setup')
-rw-r--r--openstack/usr/share/openstack/postgres-setup9
1 files changed, 8 insertions, 1 deletions
diff --git a/openstack/usr/share/openstack/postgres-setup b/openstack/usr/share/openstack/postgres-setup
index 36d89d97..69ee2391 100644
--- a/openstack/usr/share/openstack/postgres-setup
+++ b/openstack/usr/share/openstack/postgres-setup
@@ -15,7 +15,11 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-set -xe
+set -e
+
+if [ -f /var/openstack/postgres-setup ]; then
+ exit 0
+fi
# Create postgres directories
install -dm700 /var/lib/pgsql/data
@@ -31,5 +35,8 @@ chown -R postgres:postgres /var/lib/pgsql /var/run/postgresql
test -d /var/lib/pgsql/data/base || sudo -u postgres pg_ctl -D /var/lib/pgsql/data initdb
+install -D -m 644 /proc/self/fd/0 <<'EOF' /var/openstack/postgres-setup
+Postgres setup: success
+EOF
exit 0