aboutsummaryrefslogtreecommitdiffstats
path: root/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
diff options
context:
space:
mode:
authorTony Hansen <tony@att.com>2017-05-15 03:08:24 +0000
committerTony Hansen <tony@att.com>2017-05-15 03:08:46 +0000
commit844a29c7570aa10775b34fe28dcc022de65fed4c (patch)
tree9cb0a2b41864ac2df388da93d7e7d07d9606cd2b /postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
parent48feaffcb16e1fd5eb3ce453b99797de1bd15d7a (diff)
[DCAE-20] fix problem with config change
Change-Id: Icc27ab79997b2aed85a061fc7f4680367896d4b4 Signed-off-by: Tony Hansen <tony@att.com>
Diffstat (limited to 'postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install')
-rw-r--r--postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install11
1 files changed, 8 insertions, 3 deletions
diff --git a/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install b/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
index 7e8c71b..a20edc6 100644
--- a/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
+++ b/postgresql-config/src/stage/opt/app/postgresql-config/etc/do-post-install
@@ -28,10 +28,15 @@ die()
[ -n "$OPENECOMP" ] || die "OPENECOMP is not set"
[ -n "$NOTOPENECOMP" ] || die "NOTOPENECOMP is not set"
-if $OPENECOMP
-then export PGDIR=${INSTALL_ROOT}/usr/lib/postgresql/9.5
-else export PGDIR=${INSTALL_ROOT}/opt/app/postgresql-9.5.2
+if [ -d ${INSTALL_ROOT}/opt/app/postgresql-9.5.2 ]
+then PGDIR=${INSTALL_ROOT}/opt/app/postgresql-9.5.2
+elif [ -d ${INSTALL_ROOT}/usr/lib/postgresql/9.6 ]
+then PGDIR=${INSTALL_ROOT}/usr/lib/postgresql/9.6
+elif [ -d ${INSTALL_ROOT}/usr/lib/postgresql/9.5 ]
+then PGDIR=${INSTALL_ROOT}/usr/lib/postgresql/9.5
+else die PostgreSQL bin directory not found
fi
+export PGDIR
export DBROOT=/dbroot/pgdata/main
export PATH=$PATH:${INSTALL_ROOT}/opt/app/postgresql-prep/bin