X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=installation%2Fsdnc%2Fsrc%2Fmain%2Fscripts%2FstartODL.sh;fp=installation%2Fsdnc%2Fsrc%2Fmain%2Fscripts%2FstartODL.sh;h=b731c35048a6409f073393fb6d7aa3b06dd818fc;hb=5333d28234d7af69524d88eb5eee77748e1cbb16;hp=644ec50f1f8d27a52d4850ec53ac9f24cb25d19f;hpb=442ee40b69056fe4e3eab8267d7129df8527cf19;p=sdnc%2Foam.git diff --git a/installation/sdnc/src/main/scripts/startODL.sh b/installation/sdnc/src/main/scripts/startODL.sh index 644ec50f..b731c350 100755 --- a/installation/sdnc/src/main/scripts/startODL.sh +++ b/installation/sdnc/src/main/scripts/startODL.sh @@ -90,11 +90,15 @@ initialize_sdnrdb() { printf "%s\n" "Execute: $INITCMD" n=0 until [ $n -ge 5 ] ; do - $INITCMD && break + $INITCMD + ret=$? + if [ $ret -eq 0 ] ; then + break; + fi n=$((n+1)) sleep 15 done - return $? + return $ret } install_sdnrwt_features() { @@ -344,6 +348,10 @@ if $SDNRINIT ; then init_result=$? printf "%s\n" "Result of init script: $init_result" if $SDNRWT ; then + if [ $init_result -ne 0 ]; then + echo "db not initialized. stopping container" + exit $init_result + fi printf "Proceed to initialize sdnr\n" else exit $init_result @@ -397,7 +405,7 @@ then if $SDNRWT ; then install_sdnrwt_features ; fi if $ENABLE_OAUTH ; then cp $SDNC_HOME/data/oauth-aaa-app-config.xml $(find $ODL_HOME/system/org/opendaylight/aaa/ -name *aaa-app-config.xml) - echo -e "\norg.ops4j.pax.web.session.cookie = none" >> $ODL_HOME/etc/org.ops4j.pax.web.cfg + echo -e "\norg.ops4j.pax.web.session.cookie.comment = disable" >> $ODL_HOME/etc/org.ops4j.pax.web.cfg install_sdnr_oauth_features fi