Skip to content

Commit

Permalink
Merge pull request #5935 from spyrkob/WFCORE-6772
Browse files Browse the repository at this point in the history
[WFCORE-6772] Make the installation-manager script POSIX compatable
  • Loading branch information
yersan authored Apr 5, 2024
2 parents 7e8a50e + dbe9e2e commit d2bc412
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This script is only for internal usage and should not be invoked directly by the users from the command line.
# This script launches the operation to apply a candidate server installation to update or revert.
# The server JVM writes the required values into the installation-manager.properties file by using InstMgrCandidateStatus.java
if [ x"${INST_MGR_SCRIPT_DEBUG}" == "xtrue" ]; then
if [ "x${INST_MGR_SCRIPT_DEBUG}" = "xtrue" ]; then
set -x
fi

Expand All @@ -20,21 +20,23 @@ if ! [ -e "${PROPS_FILE}" ]; then
fi

while IFS='=' read -r key value; do
[ "${key:0:1}" = "#" ] && continue
export "${key}=${value}"
case "${key}" in
"#"*) continue ;;
*) export "${key}=${value}" ;;
esac
done < "$PROPS_FILE"

if [ x"${INST_MGR_STATUS}" == "x" ]; then
if [ "x${INST_MGR_STATUS}" = "x" ]; then
echo "ERROR: Cannot read the Installation Manager status."
exit
fi

if ! [ "${INST_MGR_STATUS}" == "PREPARED" ]; then
if ! [ "${INST_MGR_STATUS}" = "PREPARED" ]; then
echo "ERROR: The Candidate Server installation is not in the PREPARED status. The current status is ${INST_MGR_STATUS}"
exit
fi

if [ x"${INST_MGR_COMMAND}" == "x" ]; then
if [ "x${INST_MGR_COMMAND}" = "x" ]; then
echo "ERROR: Installation Manager command was not set."
exit
fi
Expand Down

0 comments on commit d2bc412

Please sign in to comment.