[jboss-jira] [JBoss JIRA] (WFCORE-3941) elytron-tool.sh script detects JBOSS_HOME incorrectly
Paramvir Jindal (JIRA)
issues at jboss.org
Wed Jun 20 00:55:00 EDT 2018
[ https://issues.jboss.org/browse/WFCORE-3941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paramvir Jindal updated WFCORE-3941:
------------------------------------
Description:
If JBOSS_HOME is set then :
Running $JBOSS_HOME/bin/elytron-tool.sh results in a warning:
WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
This script has two issues :
It sets *SANITIZED_JBOSS_HOME* to *$JBOSS_HOME/..* instead of *$JBOSS_HOME*
It compares *RESOLVED_JBOSS* to *SANITIZED_JBOSS_HOME*, instead of *RESOLVED_JBOSS_HOME*
*Current elytron-tool.sh :*
----------------------------------------------------------------------------------
# Setup JBOSS_HOME
RESOLVED_JBOSS_HOME=`cd "$DIRNAME/.."; pwd`
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=$RESOLVED_JBOSS_HOME
else
SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME/.."; pwd`
if [ "$RESOLVED_JBOSS" != "$SANITIZED_JBOSS_HOME" ]; then
echo "WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur."
echo ""
fi
fi
export JBOSS_HOME
---------------------------------------------------------------------------------
*Expected elytron-tool.sh*
---------------------------------------------------------------------------------
# Setup JBOSS_HOME
RESOLVED_JBOSS_HOME=`cd "$DIRNAME/.."; pwd`
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=$RESOLVED_JBOSS_HOME
else
SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME"; pwd`
if [ "$RESOLVED_JBOSS_HOME" != "$SANITIZED_JBOSS_HOME" ]; then
echo "WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur."
echo ""
fi
fi
export JBOSS_HOME
------------------------------------------------------------------------------
was:
If JBOSS_HOME is set then :
Running $JBOSS_HOME/bin/elytron-tool.sh results in a warning:
WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
This script has two issues :
It sets *SANITIZED_JBOSS_HOME* to *$JBOSS_HOME/..* instead of *$JBOSS_HOME*
It compares *RESOLVED_JBOSS* to *SANITIZED_JBOSS_HOME*, instead of *RESOLVED_JBOSS_HOME*
*Current elytron-tool.sh :*
----------------------------------------------------------------------------------
# Setup JBOSS_HOME
RESOLVED_JBOSS_HOME=`cd "$DIRNAME/.."; pwd`
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=$RESOLVED_JBOSS_HOME
else
SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME/.."; pwd`
if [ "$RESOLVED_JBOSS" != "$SANITIZED_JBOSS_HOME" ]; then
echo "WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur."
echo ""
fi
fi
export JBOSS_HOME
---------------------------------------------------------------------------------
*Expected elytron-tool.sh*
---------------------------------------------------------------------------------
# Setup JBOSS_HOME
RESOLVED_JBOSS_HOME=`cd "$DIRNAME/.."; pwd`
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=$RESOLVED_JBOSS_HOME
else
SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME"; pwd`
if [ "$RESOLVED_JBOSS_HOME" != "$SANITIZED_JBOSS_HOME" ]; then
echo "WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur."
echo ""
fi
fi
export JBOSS_HOME
------------------------------------------------------------------------------
> elytron-tool.sh script detects JBOSS_HOME incorrectly
> -----------------------------------------------------
>
> Key: WFCORE-3941
> URL: https://issues.jboss.org/browse/WFCORE-3941
> Project: WildFly Core
> Issue Type: Bug
> Components: Scripts
> Affects Versions: 5.0.0.Final, 6.0.0.Alpha1
> Reporter: Paramvir Jindal
>
> If JBOSS_HOME is set then :
> Running $JBOSS_HOME/bin/elytron-tool.sh results in a warning:
> WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
> This script has two issues :
> It sets *SANITIZED_JBOSS_HOME* to *$JBOSS_HOME/..* instead of *$JBOSS_HOME*
> It compares *RESOLVED_JBOSS* to *SANITIZED_JBOSS_HOME*, instead of *RESOLVED_JBOSS_HOME*
> *Current elytron-tool.sh :*
> ----------------------------------------------------------------------------------
> # Setup JBOSS_HOME
> RESOLVED_JBOSS_HOME=`cd "$DIRNAME/.."; pwd`
> if [ "x$JBOSS_HOME" = "x" ]; then
> # get the full path (without any relative bits)
> JBOSS_HOME=$RESOLVED_JBOSS_HOME
> else
> SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME/.."; pwd`
> if [ "$RESOLVED_JBOSS" != "$SANITIZED_JBOSS_HOME" ]; then
> echo "WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur."
> echo ""
> fi
> fi
> export JBOSS_HOME
> ---------------------------------------------------------------------------------
> *Expected elytron-tool.sh*
> ---------------------------------------------------------------------------------
> # Setup JBOSS_HOME
> RESOLVED_JBOSS_HOME=`cd "$DIRNAME/.."; pwd`
> if [ "x$JBOSS_HOME" = "x" ]; then
> # get the full path (without any relative bits)
> JBOSS_HOME=$RESOLVED_JBOSS_HOME
> else
> SANITIZED_JBOSS_HOME=`cd "$JBOSS_HOME"; pwd`
> if [ "$RESOLVED_JBOSS_HOME" != "$SANITIZED_JBOSS_HOME" ]; then
> echo "WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur."
> echo ""
> fi
> fi
> export JBOSS_HOME
> ------------------------------------------------------------------------------
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list