This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 3693e41  IGNITE-13328 Fixed: control.sh returns invalid error code - 
Fixes #8123.
3693e41 is described below

commit 3693e41326547e847b20bb992e6dd384711c9478
Author: Ivan Daschinskiy <ivanda...@gmail.com>
AuthorDate: Wed Aug 26 18:03:12 2020 +0300

    IGNITE-13328 Fixed: control.sh returns invalid error code - Fixes #8123.
    
    Signed-off-by: Aleksey Plekhanov <plehanov.a...@gmail.com>
---
 bin/control.sh | 59 ++++++++++++----------------------------------------------
 1 file changed, 12 insertions(+), 47 deletions(-)

diff --git a/bin/control.sh b/bin/control.sh
index 5d615d4..d0e4292 100755
--- a/bin/control.sh
+++ b/bin/control.sh
@@ -67,9 +67,6 @@ 
CP="${IGNITE_LIBS}:${IGNITE_HOME}/libs/optional/ignite-zookeeper/*"
 
 RANDOM_NUMBER=$("$JAVA" -cp "${CP}" 
org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
 
-RESTART_SUCCESS_FILE="${IGNITE_HOME}/work/ignite_success_${RANDOM_NUMBER}"
-RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
-
 #
 # Find available port for JMX
 #
@@ -180,47 +177,15 @@ elif [ $version -ge 11 ] ; then
         ${JVM_OPTS}"
 fi
 
-ERRORCODE="-1"
-
-while [ "${ERRORCODE}" -ne "130" ]
-do
-    if [ "${INTERACTIVE:-}" == "1" ] ; then
-        case $osname in
-            Darwin*)
-                "$JAVA" ${JVM_OPTS} ${QUIET:-} "${DOCK_OPTS}" 
"${RESTART_SUCCESS_OPT}" ${JMX_MON:-} \
-                -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" 
${MAIN_CLASS} $@
-            ;;
-            *)
-                "$JAVA" ${JVM_OPTS} ${QUIET:-} "${RESTART_SUCCESS_OPT}" 
${JMX_MON:-} \
-                -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" 
${MAIN_CLASS} $@
-            ;;
-        esac
-    else
-        case $osname in
-            Darwin*)
-                "$JAVA" ${JVM_OPTS} ${QUIET:-} "${DOCK_OPTS}" 
"${RESTART_SUCCESS_OPT}" ${JMX_MON:-} \
-                 -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" 
\
-                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" 
${MAIN_CLASS} $@
-            ;;
-            *)
-                "$JAVA" ${JVM_OPTS} ${QUIET:-} "${RESTART_SUCCESS_OPT}" 
${JMX_MON:-} \
-                 -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" 
\
-                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" 
${MAIN_CLASS} $@
-            ;;
-        esac
-    fi
-
-    ERRORCODE="$?"
-
-    if [ ! -f "${RESTART_SUCCESS_FILE}" ] ; then
-        break
-    else
-        rm -f "${RESTART_SUCCESS_FILE}"
-    fi
-done
-
-if [ -f "${RESTART_SUCCESS_FILE}" ] ; then
-    rm -f "${RESTART_SUCCESS_FILE}"
-fi
+case $osname in
+    Darwin*)
+        "$JAVA" ${JVM_OPTS} ${QUIET:-} "${DOCK_OPTS}" ${JMX_MON:-} \
+         -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+         -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
+    ;;
+    *)
+        "$JAVA" ${JVM_OPTS} ${QUIET:-} ${JMX_MON:-} \
+         -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
+         -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
+    ;;
+esac

Reply via email to