Browse code

Re-add postgresql-setup initdb for Fedora

The Fedora RPM does not set up the postgresql data directory.
postgresql-setup initdb must be run after installing the RPM.

Change-Id: I5e5ab659e83f4ee6a024f74a23bf4562ea0065ce

Terry Wilson authored on 2012/11/21 03:08:13
Showing 1 changed files
... ...
@@ -23,6 +23,7 @@ function configure_database_postgresql {
23 23
     if [[ "$os_PACKAGE" = "rpm" ]]; then
24 24
         PG_HBA=/var/lib/pgsql/data/pg_hba.conf
25 25
         PG_CONF=/var/lib/pgsql/data/postgresql.conf
26
+        sudo [ -e $PG_HBA ] || sudo postgresql-setup initdb
26 27
     else
27 28
         PG_DIR=`find /etc/postgresql -name pg_hba.conf|xargs dirname`
28 29
         PG_HBA=$PG_DIR/pg_hba.conf