Neon SR1 upgrade
[appc.git] / appc-sdc-listener / appc-sdc-listener-installer / src / main / resources / scripts / install-feature.sh
old mode 100644 (file)
new mode 100755 (executable)
index 6c2a503..64b4d08
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 ###
 # ============LICENSE_START=======================================================
 # ONAP : APPC
@@ -21,8 +23,6 @@
 # ============LICENSE_END=========================================================
 ###
 
-#!/bin/bash
-
 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
 ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
 ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-""}
@@ -33,14 +33,13 @@ REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
 if [ -f ${REPOZIP} ]
 then
        unzip -n -d ${ODL_HOME} ${REPOZIP}
-else
-       echo "ERROR : repo zip ($REPOZIP) not found"
-       exit 1
+
 fi
 
 COUNT=0
 while [ $COUNT -lt 10 ]; do
-       ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} 2> /tmp/installErr
+#      ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} 2> /tmp/installErr
+        sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:repo-add ${features.repositories}"
        cat /tmp/installErr
        if grep -q 'Failed to get the session' /tmp/installErr; then
                sleep 10