You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2019/03/21 14:39:50 UTC

[ignite] branch ignite-2.7.5 updated (9c2ba40 -> 5734b8a)

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

dpavlov pushed a change to branch ignite-2.7.5
in repository https://gitbox.apache.org/repos/asf/ignite.git.


    from 9c2ba40  IGNITE-9794 Handle UnregisteredBinaryTypeException on metadata registration under topology lock. - Fixes #4916.
     new 45cf35a  IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6061)
     new 47a1c36  IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6084)
     new 1a506f8  IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6095)
     new 5734b8a  IGNITE-11572 Node restart in ignite.sh was broken by IGNITE-11216 (#6307)

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 bin/control.sh                 | 40 +++++++++++++++++++++++-----------------
 bin/ignite-tf.sh               | 24 +++++++++++++++---------
 bin/ignite.sh                  | 30 ++++++++++++++++++------------
 bin/ignitevisorcmd.sh          | 12 +++++++++---
 bin/include/functions.sh       | 12 +++++++++---
 bin/include/parseargs.sh       | 20 ++++++++++++++++++--
 bin/include/setenv.sh          | 16 +++++++++++-----
 modules/sqlline/bin/sqlline.sh | 14 ++++++++++----
 8 files changed, 113 insertions(+), 55 deletions(-)


[ignite] 01/04: IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6061)

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-2.7.5
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 45cf35a9e32a4fd57a16cad3e12c3e8c15ec7d62
Author: Peter Ivanov <mr...@gmail.com>
AuthorDate: Mon Feb 11 18:57:41 2019 +0300

    IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6061)
    
    (cherry picked from commit 12bd7cdfbb6eb296d7d76bbe738f1c10a309296f)
---
 bin/ignite.sh            | 18 ++++++++++++------
 bin/include/functions.sh | 10 ++++++++--
 bin/include/parseargs.sh | 18 +++++++++++++++++-
 bin/include/setenv.sh    | 16 +++++++++++-----
 4 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/bin/ignite.sh b/bin/ignite.sh
index 8ef040c..0ba839f 100755
--- a/bin/ignite.sh
+++ b/bin/ignite.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -23,7 +29,7 @@
 #
 # Import common functions.
 #
-if [ "${IGNITE_HOME}" = "" ];
+if [ "${IGNITE_HOME:-}" = "" ];
     then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
     else IGNITE_HOME_TMP=${IGNITE_HOME};
 fi
@@ -45,7 +51,7 @@ checkJava
 #
 setIgniteHome
 
-if [ "${DEFAULT_CONFIG}" == "" ]; then
+if [ "${DEFAULT_CONFIG:-}" == "" ]; then
     DEFAULT_CONFIG=config/default-config.xml
 fi
 
@@ -80,7 +86,7 @@ fi
 # Mac OS specific support to display correct name in the dock.
 osname=`uname`
 
-if [ "${DOCK_OPTS}" == "" ]; then
+if [ "${DOCK_OPTS:-}" == "" ]; then
     DOCK_OPTS="-Xdock:name=Ignite Node"
 fi
 
@@ -134,7 +140,7 @@ fi
 #
 # Set main class to start service (grid node by default).
 #
-if [ "${MAIN_CLASS}" = "" ]; then
+if [ "${MAIN_CLASS:-}" = "" ]; then
     MAIN_CLASS=org.apache.ignite.startup.cmdline.CommandLineStartup
 fi
 
@@ -147,7 +153,7 @@ fi
 #
 # Final JVM_OPTS for Java 9+ compatibility
 #
-javaMajorVersion "${JAVA_HOME}/bin/java"
+javaMajorVersion "${JAVA}"
 
 if [ $version -eq 8 ] ; then
     JVM_OPTS="\
diff --git a/bin/include/functions.sh b/bin/include/functions.sh
index 7bdcefd..4edf0e6 100755
--- a/bin/include/functions.sh
+++ b/bin/include/functions.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -96,7 +102,7 @@ setIgniteHome() {
     #
     # Set IGNITE_HOME, if needed.
     #
-    if [ "${IGNITE_HOME}" = "" ]; then
+    if [ "${IGNITE_HOME:-}" = "" ]; then
         export IGNITE_HOME=${IGNITE_HOME_TMP}
     fi
 
diff --git a/bin/include/parseargs.sh b/bin/include/parseargs.sh
index 3ab255e..759994d 100755
--- a/bin/include/parseargs.sh
+++ b/bin/include/parseargs.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -51,3 +57,13 @@ do
     esac
     shift
 done
+
+#
+# Set 'file.encoding' to UTF-8 default if not specified otherwise
+#
+case "${JVM_OPTS:-}" in
+    *-Dfile.encoding=*)
+        ;;
+    *)
+        JVM_OPTS="${JVM_OPTS:-} -Dfile.encoding=UTF-8";;
+esac
diff --git a/bin/include/setenv.sh b/bin/include/setenv.sh
index 4b82cf9..7290ccd 100755
--- a/bin/include/setenv.sh
+++ b/bin/include/setenv.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -27,7 +33,7 @@
 #
 # Check IGNITE_HOME.
 #
-if [ "${IGNITE_HOME}" = "" ]; then
+if [ "${IGNITE_HOME:-}" = "" ]; then
     echo $0", ERROR: Ignite installation folder is not found."
     echo "Please create IGNITE_HOME variable pointing to location of"
     echo "Ignite installation folder."
@@ -62,12 +68,12 @@ IFS=$(echo -en "\n\b")
 for file in ${IGNITE_HOME}/libs/*
 do
     if [ -d ${file} ] && [ "${file}" != "${IGNITE_HOME}"/libs/optional ]; then
-        IGNITE_LIBS=${IGNITE_LIBS}${SEP}${file}/*
+        IGNITE_LIBS=${IGNITE_LIBS:-}${SEP}${file}/*
     fi
 done
 
 IFS=$SAVEIFS
 
-if [ "${USER_LIBS}" != "" ]; then
-    IGNITE_LIBS=${USER_LIBS}${SEP}${IGNITE_LIBS}
+if [ "${USER_LIBS:-}" != "" ]; then
+    IGNITE_LIBS=${USER_LIBS:-}${SEP}${IGNITE_LIBS}
 fi


[ignite] 04/04: IGNITE-11572 Node restart in ignite.sh was broken by IGNITE-11216 (#6307)

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-2.7.5
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 5734b8a9b14573d39f9f4ab9a24bfe6b8a7aac20
Author: Peter Ivanov <mr...@gmail.com>
AuthorDate: Thu Mar 21 13:30:02 2019 +0300

    IGNITE-11572 Node restart in ignite.sh was broken by IGNITE-11216 (#6307)
    
    (cherry picked from commit 221cd6c97a364171e24562cb45d067de9097bd4f)
---
 bin/ignite.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/ignite.sh b/bin/ignite.sh
index 0ba839f..75681fe 100755
--- a/bin/ignite.sh
+++ b/bin/ignite.sh
@@ -5,6 +5,7 @@ set -o pipefail
 set -o errtrace
 set -o functrace
 
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -194,12 +195,12 @@ do
             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}
+                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?"
             ;;
             *)
                 "$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}
+                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?"
             ;;
         esac
     else
@@ -207,18 +208,16 @@ do
             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} "${CONFIG}"
+                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?"
             ;;
             *)
                 "$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} "${CONFIG}"
+                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?"
             ;;
         esac
     fi
 
-    ERRORCODE="$?"
-
     if [ ! -f "${RESTART_SUCCESS_FILE}" ] ; then
         break
     else
@@ -229,3 +228,4 @@ done
 if [ -f "${RESTART_SUCCESS_FILE}" ] ; then
     rm -f "${RESTART_SUCCESS_FILE}"
 fi
+


[ignite] 02/04: IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6084)

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-2.7.5
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 47a1c368e48ba759899d0ba9596793387782ff88
Author: Peter Ivanov <mr...@gmail.com>
AuthorDate: Tue Feb 12 13:33:21 2019 +0300

    IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6084)
    
    (cherry picked from commit 033170d90f6c0618b9d6a3fd997e13a5ec1fff89)
---
 bin/include/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/include/functions.sh b/bin/include/functions.sh
index 4edf0e6..199fd4e 100755
--- a/bin/include/functions.sh
+++ b/bin/include/functions.sh
@@ -61,7 +61,7 @@ javaMajorVersion() {
 #
 checkJava() {
     # Check JAVA_HOME.
-    if [ "$JAVA_HOME" = "" ]; then
+    if [ "${JAVA_HOME:-}" = "" ]; then
         JAVA=`type -p java`
         RETCODE=$?
 


[ignite] 03/04: IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6095)

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-2.7.5
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 1a506f8104537ff47ab965e018acb34299b74652
Author: Peter Ivanov <mr...@gmail.com>
AuthorDate: Fri Feb 15 17:28:52 2019 +0300

    IGNITE-11216 Ignite.sh fails on Mac OS and Linux - Java 11 (#6095)
    
    (cherry picked from commit 832f3a2f39942a870111d3509f8cf0f32197a0f0)
---
 bin/control.sh                 | 40 +++++++++++++++++++++++-----------------
 bin/ignite-tf.sh               | 24 +++++++++++++++---------
 bin/ignitevisorcmd.sh          | 12 +++++++++---
 bin/include/parseargs.sh       |  2 +-
 modules/sqlline/bin/sqlline.sh | 14 ++++++++++----
 5 files changed, 58 insertions(+), 34 deletions(-)

diff --git a/bin/control.sh b/bin/control.sh
index 7f84696..dba9f0f 100755
--- a/bin/control.sh
+++ b/bin/control.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -23,7 +29,7 @@
 #
 # Import common functions.
 #
-if [ "${IGNITE_HOME}" = "" ];
+if [ "${IGNITE_HOME:-}" = "" ];
     then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
     else IGNITE_HOME_TMP=${IGNITE_HOME};
 fi
@@ -45,7 +51,7 @@ checkJava
 #
 setIgniteHome
 
-if [ "${DEFAULT_CONFIG}" == "" ]; then
+if [ "${DEFAULT_CONFIG:-}" == "" ]; then
     DEFAULT_CONFIG=config/default-config.xml
 fi
 
@@ -68,14 +74,14 @@ RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
 #
 # This is executed when -nojmx is not specified
 #
-if [ "${NOJMX}" == "0" ] ; then
+if [ "${NOJMXI:-}" == "0" ] ; then
     findAvailableJmxPort
 fi
 
 # Mac OS specific support to display correct name in the dock.
 osname=`uname`
 
-if [ "${DOCK_OPTS}" == "" ]; then
+if [ "${DOCK_OPTS:-}" == "" ]; then
     DOCK_OPTS="-Xdock:name=Ignite Node"
 fi
 
@@ -84,7 +90,7 @@ fi
 #
 # ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 #
-if [ -z "$JVM_OPTS" ] ; then
+if [ -z "${JVM_OPTS:-}" ] ; then
     if [[ `"$JAVA" -version 2>&1 | egrep "1\.[7]\."` ]]; then
         JVM_OPTS="-Xms256m -Xmx1g"
     else
@@ -122,14 +128,14 @@ ENABLE_ASSERTIONS="1"
 #
 # Set '-ea' options if assertions are enabled.
 #
-if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
+if [ "${ENABLE_ASSERTIONS:-}" = "1" ]; then
     JVM_OPTS="${JVM_OPTS} -ea"
 fi
 
 #
 # Set main class to start service (grid node by default).
 #
-if [ "${MAIN_CLASS}" = "" ]; then
+if [ "${MAIN_CLASS:-}" = "" ]; then
     MAIN_CLASS=org.apache.ignite.internal.commandline.CommandHandler
 fi
 
@@ -155,30 +161,30 @@ ERRORCODE="-1"
 
 while [ "${ERRORCODE}" -ne "130" ]
 do
-    if [ "${INTERACTIVE}" == "1" ] ; then
+    if [ "${INTERACTIVE:-}" == "1" ] ; then
         case $osname in
             Darwin*)
-                "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
+                "$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} $@
+                -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
             ;;
             *)
-                "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
+                "$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} $@
+                -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} \
+                "$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} $@
+                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
             ;;
             *)
-                "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" ${JMX_MON} \
+                "$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} $@
+                 -DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
             ;;
         esac
     fi
diff --git a/bin/ignite-tf.sh b/bin/ignite-tf.sh
index a6499ae..9eb336a 100644
--- a/bin/ignite-tf.sh
+++ b/bin/ignite-tf.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -23,7 +29,7 @@
 #
 # Import common functions.
 #
-if [ "${IGNITE_HOME}" = "" ];
+if [ "${IGNITE_HOME:-}" = "" ];
     then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
     else IGNITE_HOME_TMP=${IGNITE_HOME};
 fi
@@ -45,7 +51,7 @@ checkJava
 #
 setIgniteHome
 
-if [ "${DEFAULT_CONFIG}" == "" ]; then
+if [ "${DEFAULT_CONFIG:-}" == "" ]; then
     DEFAULT_CONFIG=config/default-config.xml
 fi
 
@@ -65,7 +71,7 @@ RESTART_SUCCESS_OPT="-DIGNITE_SUCCESS_FILE=${RESTART_SUCCESS_FILE}"
 # Mac OS specific support to display correct name in the dock.
 osname=`uname`
 
-if [ "${DOCK_OPTS}" == "" ]; then
+if [ "${DOCK_OPTS:-}" == "" ]; then
     DOCK_OPTS="-Xdock:name=Ignite Node"
 fi
 
@@ -74,7 +80,7 @@ fi
 #
 # ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
 #
-if [ -z "$JVM_OPTS" ] ; then
+if [ -z "${JVM_OPTS:-}" ] ; then
     JVM_OPTS="-Xms1g -Xmx1g -server -XX:MaxMetaspaceSize=256m"
 fi
 
@@ -103,7 +109,7 @@ ENABLE_ASSERTIONS="1"
 #
 # Set '-ea' options if assertions are enabled.
 #
-if [ "${ENABLE_ASSERTIONS}" = "1" ]; then
+if [ "${ENABLE_ASSERTIONS:-}" = "1" ]; then
     JVM_OPTS="${JVM_OPTS} -ea"
 fi
 
@@ -158,12 +164,12 @@ while [ "${ERRORCODE}" -ne "130" ]
 do
     case $osname in
         Darwin*)
-            "$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}"  \
+            "$JAVA" ${JVM_OPTS:-} ${QUIET:-} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}"  \
              -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-             -DIGNITE_PROG_NAME="$0" -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" "$@"
+             -DIGNITE_PROG_NAME="$0" -cp "${CP}" ${MAIN_CLASS} "${CONFIG:-}" "$@"
         ;;
         *)
-            "$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \
+            "$JAVA" ${JVM_OPTS:-} ${QUIET:-} "${RESTART_SUCCESS_OPT}" \
              -DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
              -DIGNITE_PROG_NAME="$0" -cp "${CP}" ${MAIN_CLASS} "$@"
         ;;
diff --git a/bin/ignitevisorcmd.sh b/bin/ignitevisorcmd.sh
index 1fcc127..001627c 100755
--- a/bin/ignitevisorcmd.sh
+++ b/bin/ignitevisorcmd.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -22,7 +28,7 @@ ARGS=$@
 #
 # Import common functions.
 #
-if [ "${IGNITE_HOME}" = "" ];
+if [ "${IGNITE_HOME:-}" = "" ];
     then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
     else IGNITE_HOME_TMP=${IGNITE_HOME};
 fi
@@ -66,7 +72,7 @@ JVM_OPTS="-Xms1g -Xmx1g -XX:MaxPermSize=128M -server ${JVM_OPTS}"
 # Mac OS specific support to display correct name in the dock.
 osname=`uname`
 
-if [ "${DOCK_OPTS}" == "" ]; then
+if [ "${DOCK_OPTS:-}" == "" ]; then
     DOCK_OPTS="-Xdock:name=Visor - Ignite Shell Console"
 fi
 
diff --git a/bin/include/parseargs.sh b/bin/include/parseargs.sh
index 759994d..3b4a070 100755
--- a/bin/include/parseargs.sh
+++ b/bin/include/parseargs.sh
@@ -40,7 +40,7 @@ set -o functrace
 # in other scripts to parse common command lines parameters.
 #
 
-CONFIG=${DEFAULT_CONFIG}
+CONFIG=${DEFAULT_CONFIG:-}
 INTERACTIVE="0"
 NOJMX="0"
 QUIET="-DIGNITE_QUIET=true"
diff --git a/modules/sqlline/bin/sqlline.sh b/modules/sqlline/bin/sqlline.sh
index 552440d..bfe1475 100644
--- a/modules/sqlline/bin/sqlline.sh
+++ b/modules/sqlline/bin/sqlline.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+set -o nounset
+set -o errexit
+set -o pipefail
+set -o errtrace
+set -o functrace
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -23,7 +29,7 @@
 #
 # Import common functions.
 #
-if [ "${IGNITE_HOME}" = "" ];
+if [ "${IGNITE_HOME:-}" = "" ];
     then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
     else IGNITE_HOME_TMP=${IGNITE_HOME};
 fi
@@ -50,10 +56,10 @@ setIgniteHome
 #
 . "${SCRIPTS_HOME}"/include/setenv.sh
 
-JDBCLINK="jdbc:ignite:thin://${HOST_AND_PORT}${SCHEMA_DELIMITER}${SCHEMA}${PARAMS}"
+JDBCLINK="jdbc:ignite:thin://${HOST_AND_PORT:-}${SCHEMA_DELIMITER:-}${SCHEMA:-}${PARAMS:-}"
 
 CP="${IGNITE_LIBS}"
 
 CP="${CP}${SEP}${IGNITE_HOME_TMP}/bin/include/sqlline/*"
 
-"$JAVA" -cp ${CP} sqlline.SqlLine -d org.apache.ignite.IgniteJdbcThinDriver $@
\ No newline at end of file
+"$JAVA" -cp ${CP} sqlline.SqlLine -d org.apache.ignite.IgniteJdbcThinDriver $@