echo "Configuring the startup features..."
FEATURESCONF=${WORKSPACE}/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg
-sed -ie "s/featuresBoot=.*/featuresBoot=config,standard,region,package,kar,ssh,management,${ACTUALFEATURES}/g" ${FEATURESCONF}
+sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" ${FEATURESCONF}
sed -ie "s%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features%mvn:org.opendaylight.integration/features-integration-index/${BUNDLEVERSION}/xml/features,mvn:org.opendaylight.integration/features-integration-test/${BUNDLEVERSION}/xml/features%g" ${FEATURESCONF}
cat ${FEATURESCONF}
echo "Starting controller..."
${WORKSPACE}/${BUNDLEFOLDER}/bin/start
+# No need for verbose printing during repeating operations.
+set +x
+
echo "Waiting for controller to come up..."
COUNT=0
while true; do
done
echo "loading many features at once. Need to allow time for problems to show up in logs. cool down for 5 min ..."
-sleep 300
+COUNT="300"
+while true; do
+ if (( "${COUNT}" <= "0" )); then
+ break
+ fi
+ echo "${COUNT} seconds yet to wait..."
+ sleep 10
+ COUNT=$(( ${COUNT} - 10 ))
+done
+
+# End of repeating operations, enable verbose printing.
+set -x
-echo "Checking OSGi bundles..."
+# echo "Checking OSGi bundles..."
# sshpass seems to fail with new karaf version
# sshpass -p karaf ${WORKSPACE}/${BUNDLEFOLDER}/bin/client -u karaf 'bundle:list'