diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2017-05-16 18:42:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-05-16 18:42:56 +0000 |
commit | 5db86521563297a93af0b4fb4b28f23a2dec0c3e (patch) | |
tree | 97720d4cf67e0ec947aad21ab1966556740e4148 /postgresql-prep/src/common/postinst | |
parent | 7c0f3ce19a502317e15f381b15e06930a1952dbc (diff) | |
parent | 8cd75a1f6b2b23516d331ed4384d09d111fd6375 (diff) |
Merge "[DCAE-20] fix problem with config change"
Diffstat (limited to 'postgresql-prep/src/common/postinst')
-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" |