diff options
author | Tony Hansen <tony@att.com> | 2017-05-16 18:29:42 +0000 |
---|---|---|
committer | Tony Hansen <tony@att.com> | 2017-05-16 18:29:50 +0000 |
commit | 8cd75a1f6b2b23516d331ed4384d09d111fd6375 (patch) | |
tree | 2d0aae25072cb11975ea319d094f01d6bacf2bd9 /postgresql-prep | |
parent | 844a29c7570aa10775b34fe28dcc022de65fed4c (diff) |
[DCAE-20] fix problem with config change
Change-Id: I46deeefb75c31be2e2eaa0c50d70bc435aa38ff3
Signed-off-by: Tony Hansen <tony@att.com>
Diffstat (limited to 'postgresql-prep')
-rwxr-xr-x | postgresql-prep/src/common/postinst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/postgresql-prep/src/common/postinst b/postgresql-prep/src/common/postinst index 6f0218e..1f8eb39 100755 --- a/postgresql-prep/src/common/postinst +++ b/postgresql-prep/src/common/postinst @@ -44,7 +44,8 @@ then INSTALL_ROOT= fi CONFDIR=/var/config/DCAE/chef -CONFCOUNT=$(ls $CONFDIR/*-postgres.conf 2>/dev/null | wc -l) +CONFDIR2=/tmp +CONFCOUNT=$(ls $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null | wc -l) case "$CONFCOUNT" in 1 ) # master: masternode @@ -56,12 +57,13 @@ case "$CONFCOUNT" in # PG_NODES : uiopmno1qwpstg00.research.example.com|asbczw1vepstg00.dcae.simpledemo.openecomp.org # PG_JAVA_HOME : /opt/app/java/jdk/jdk170 # PG_CLUSTER : global - cat $CONFDIR/*-postgres.conf | sed -e 's/ *: */="/' -e 's/[ ]*$/"/' -e 's/=""/="/' -e 's/""$/"/' > $TMP + cat $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null | + sed -e 's/ *: */="/' -e 's/[ ]*$/"/' -e 's/=""/="/' -e 's/""$/"/' > $TMP . $TMP ;; 0 ) ;; * ) - die "More than one postgres.conf was found: $(ls $CONFDIR/*-postgres.conf 2>&1)" + die "More than one postgres.conf was found: $(ls $CONFDIR/*-postgres.conf $CONFDIR2/*-postgres.conf 2>/dev/null)" esac [ -n "$PG_NODES" ] || die "PG_NODES is not set" |