You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/04/26 19:30:31 UTC

svn commit: r1330984 - /karaf/trunk/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf

Author: jbonofre
Date: Thu Apr 26 17:30:31 2012
New Revision: 1330984

URL: http://svn.apache.org/viewvc?rev=1330984&view=rev
Log:
[KARAF-1410] Fix karaf script stop mode when KARAF_DEBUG is enabled

Modified:
    karaf/trunk/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf

Modified: karaf/trunk/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf
URL: http://svn.apache.org/viewvc/karaf/trunk/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf?rev=1330984&r1=1330983&r2=1330984&view=diff
==============================================================================
--- karaf/trunk/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf (original)
+++ karaf/trunk/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf Thu Apr 26 17:30:31 2012
@@ -40,6 +40,13 @@ if [ "x$JAVA_MAX_MEM" = "x" ]; then
     export JAVA_MAX_MEM
 fi
 
+#
+# Check the mode that initiated the script
+#
+if [ "x$1" != "x" ]; then
+    MODE=$1
+fi
+
 warn() {
     echo "${PROGNAME}: $*"
 }
@@ -227,6 +234,10 @@ setupDebugOptions() {
 
     # Set Debug options if enabled
     if [ "x$KARAF_DEBUG" != "x" ]; then
+        # Ignore DEBUG in case of stop mode
+        if [ "x$MODE" = "xstop" ]; then
+            return
+        fi
         # Use the defaults if JAVA_DEBUG_OPTS was not set
         if [ "x$JAVA_DEBUG_OPTS" = "x" ]; then
             JAVA_DEBUG_OPTS="$DEFAULT_JAVA_DEBUG_OPTS"