From ab3b3a20ab0d0642738783fe9437173397478eb4 Mon Sep 17 00:00:00 2001 From: Yeray Borges Date: Thu, 18 Jan 2024 17:49:01 +0000 Subject: [PATCH] [WFCORE-6531] Wrap server options in double quotes Jira issue: https://issues.redhat.com/browse/WFCORE-6531 --- .../common/src/main/resources/content/bin/domain.sh | 8 ++++---- .../src/main/resources/content/bin/standalone.sh | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core-feature-pack/common/src/main/resources/content/bin/domain.sh b/core-feature-pack/common/src/main/resources/content/bin/domain.sh index 59b7b07b41b..e5d55da4729 100644 --- a/core-feature-pack/common/src/main/resources/content/bin/domain.sh +++ b/core-feature-pack/common/src/main/resources/content/bin/domain.sh @@ -24,7 +24,7 @@ do exit 1 ;; *) - SERVER_OPTS="$SERVER_OPTS '$1'" + SERVER_OPTS="$SERVER_OPTS \"$1\"" ;; esac shift @@ -112,7 +112,7 @@ if $linux; then for var in $HOST_CONTROLLER_OPTS do # Remove quotes - p=`echo $var | tr -d "'"` + p=`echo $var | tr -d "'" | tr -d "\""` case $p in -Djboss.domain.base.dir=*) JBOSS_BASE_DIR=`readlink -m ${p#*=}` @@ -134,7 +134,7 @@ if $solaris; then for var in $HOST_CONTROLLER_OPTS do # Remove quotes - p=`echo $var | tr -d "'"` + p=`echo $var | tr -d "'" | tr -d "\""` case $p in -Djboss.domain.base.dir=*) JBOSS_BASE_DIR=`echo $p | awk -F= '{print $2}'` @@ -157,7 +157,7 @@ if $darwin || $other ; then for var in $HOST_CONTROLLER_OPTS do # Remove quotes - p=`echo $var | tr -d "'"` + p=`echo $var | tr -d "'" | tr -d "\""` case $p in -Djboss.domain.base.dir=*) JBOSS_BASE_DIR=`cd ${p#*=} ; pwd -P` diff --git a/core-feature-pack/common/src/main/resources/content/bin/standalone.sh b/core-feature-pack/common/src/main/resources/content/bin/standalone.sh index cf6be85a9ef..60a8e06e815 100644 --- a/core-feature-pack/common/src/main/resources/content/bin/standalone.sh +++ b/core-feature-pack/common/src/main/resources/content/bin/standalone.sh @@ -34,7 +34,7 @@ do shift break;; *) - SERVER_OPTS="$SERVER_OPTS '$1'" + SERVER_OPTS="$SERVER_OPTS \"$1\"" ;; esac shift @@ -144,7 +144,7 @@ if $linux; then for var in $CONSOLIDATED_OPTS do # Remove quotes - p=`echo $var | tr -d "'"` + p=`echo $var | tr -d "'" | tr -d "\""` case $p in -Djboss.server.base.dir=*) JBOSS_BASE_DIR=`readlink -m ${p#*=}` @@ -165,8 +165,8 @@ if $solaris; then # process the standalone options for var in $CONSOLIDATED_OPTS do - # Remove quotes - p=`echo $var | tr -d "'"` + # Remove quotes + p=`echo $var | tr -d "'" | tr -d "\""` case $p in -Djboss.server.base.dir=*) JBOSS_BASE_DIR=`echo $p | awk -F= '{print $2}'` @@ -189,7 +189,7 @@ if $darwin || $freebsd || $other ; then for var in $CONSOLIDATED_OPTS do # Remove quotes - p=`echo $var | tr -d "'"` + p=`echo $var | tr -d "'" | tr -d "\""` case $p in -Djboss.server.base.dir=*) JBOSS_BASE_DIR=`cd ${p#*=} ; pwd -P`