summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-08-04 21:16:11 +0000
committerGerrit Code Review <gerrit@onap.org>2017-08-04 21:16:11 +0000
commit21e0f0079894c855266a7a41bcb1a73403641302 (patch)
tree422182c644522af490e88aab06ec21567873245b
parent8c79aa61b51e22a3bd0cbe3201ec61067d4fbfe6 (diff)
parent013b0e7f66eabb03fc238f17917579abfab3aade (diff)
Merge "[POLICY-145] global name/value should be local"
-rw-r--r--policy-drools/docker-install.sh24
1 files changed, 22 insertions, 2 deletions
diff --git a/policy-drools/docker-install.sh b/policy-drools/docker-install.sh
index 281ace10..cedb2121 100644
--- a/policy-drools/docker-install.sh
+++ b/policy-drools/docker-install.sh
@@ -41,6 +41,8 @@ function POLICY_HOME() {
set -x
fi
+ local POLICY_HOME_ABS
+
if [[ -z ${POLICY_HOME} ]]; then
echo "error: aborting installation: the installation directory POLICY_HOME must be set"
exit 1
@@ -66,6 +68,8 @@ function check_java() {
set -x
fi
+ local TARGET_JAVA_VERSION INSTALLED_JAVA_VERSION
+
TARGET_JAVA_VERSION=$1
if [[ -z ${JAVA_HOME} ]]; then
@@ -103,6 +107,8 @@ function process_configuration() {
echo "-- ${FUNCNAME[0]} $@ --"
set -x
fi
+
+ local CONF_FILE name value
CONF_FILE=$1
while read line || [ -n "${line}" ]; do
@@ -137,6 +143,8 @@ function configure_component() {
echo "-- ${FUNCNAME[0]} $@ --"
set -x
fi
+
+ local CONF_FILE COMPONENT_ROOT_DIR name value
CONF_FILE=$1
COMPONENT_ROOT_DIR=$2
@@ -266,6 +274,8 @@ function install_prereqs() {
echo "-- ${FUNCNAME[0]} $@ --"
set -x
fi
+
+ local CONF_FILE HOME_OWNER
CONF_FILE=$1
@@ -305,6 +315,8 @@ function configure_base() {
echo "-- ${FUNCNAME[0]} $@ --"
set -x
fi
+
+ local BASH_PROFILE_LINE PROFILE_LINE
# check if fqdn is set in base.conf and use that value if set
if [[ -z ${INSTALL_FQDN} ]]
@@ -341,6 +353,8 @@ function install_base() {
echo "-- ${FUNCNAME[0]} $@ --"
set -x
fi
+
+ local POLICY_HOME_CONTENTS BASE_TGZ BASEX_TGZ BASH_PROFILE_LINE
install_prereqs "${BASE_CONF}"
@@ -439,7 +453,6 @@ function install_base() {
# chmod -R 755 ${POLICY_HOME}/nagios > /dev/null 2>&1
- HOME_M2=$HOME/.m2
if [[ -d $HOME_M2 ]]; then
echo "Renaming existing $HOME_M2 to $HOME/m2.$TIMESTAMP"
mv $HOME_M2 $HOME/m2.$TIMESTAMP
@@ -494,6 +507,8 @@ function install_controller()
echo "error: aborting installation: ${POLICY_HOME}/etc/profile.d/env.sh is not accessible"
exit 1
fi
+
+ local CONTROLLER_CONF CONTROLLER_ZIP RULES_JAR SOURCE_DIR CONTROLLER_DIR AAAA BBBB PORT UTOPIC ARTIFACT_VERSION
CONTROLLER_CONF=$COMPONENT_TYPE.conf
install_prereqs "${CONTROLLER_CONF}"
@@ -625,6 +640,8 @@ function update_monitor() {
echo "-- ${FUNCNAME[0]} $@ --"
set -x
fi
+
+ local NAME lastline
NAME=$1
@@ -804,8 +821,9 @@ function installFeatures
echo "-- ${FUNCNAME[0]} $@ --"
set -x
fi
+
+ local name featureConf
- FEATURES_HOME="${POLICY_HOME}/features"
mkdir -p "${FEATURES_HOME}" > /dev/null 2>&1
if [[ -d "${FEATURES_HOME}" && -x "${FEATURES_HOME}" ]]; then
SOURCE_DIR=$PWD
@@ -873,5 +891,7 @@ LOGFILE=$PWD/install.log.$TIMESTAMP
OPERATION=install
BASE_CONF=base.conf
+HOME_M2=$HOME/.m2
+FEATURES_HOME="${POLICY_HOME}/features"
do_install 2>&1 | tee $LOGFILE