Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[BZ 1153373] RHQ fails to do dev startup after new install on Mac OS/X .
Browse files Browse the repository at this point in the history
I fixed the rhq-agent* scripts as these are the minimal changes to make a rhq install work. Any more changes represent risk especially at this late stage in JON release.
(cherry picked from commit 04fd135)

Signed-off-by: John Mazzitelli <mazz@redhat.com>
  • Loading branch information
mtho11 authored and jmazzitelli committed Oct 21, 2014
1 parent afc5a92 commit 284763e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh
Expand Up @@ -148,8 +148,12 @@ else
# only certain platforms support the -e argument for readlink
if [ -n "${_LINUX}${_SOLARIS}${_CYGWIN}" ]; then
_READLINK_ARG="-e"
_DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null || echo "$0"`
elif [ -n "${_DARWIN}" ]; then
_DOLLARZERO=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`
else
_DOLLARZERO=`readlink "$0" 2>/dev/null || echo "$0"`
fi
_DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null || echo "$0"`
fi


Expand Down
8 changes: 6 additions & 2 deletions modules/enterprise/agent/src/etc/rhq-agent.sh
Expand Up @@ -89,10 +89,14 @@ if [ $? -ne 0 ]; then
_DOLLARZERO="$0"
else
# only certain platforms support the -e argument for readlink
if [ -n "${_LINUX}${_SOLARIS}${_CYGWIN}" ]; then
if [ -n "${_LINUX}${_SOLARIS}${_CYGWIN}" ]; then
_READLINK_ARG="-e"
_DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null || echo "$0"`
elif [ -n "${_DARWIN}" ]; then
_DOLLARZERO=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`
else
_DOLLARZERO=`readlink "$0" 2>/dev/null || echo "$0"`
fi
_DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null || echo "$0"`
fi

RHQ_AGENT_BIN_DIR_PATH=`dirname "$_DOLLARZERO"`
Expand Down
10 changes: 9 additions & 1 deletion modules/enterprise/agent/src/etc/standalone-pc.sh
Expand Up @@ -7,7 +7,15 @@ if [ $? -ne 0 ]; then
echo >&2 ' Consider installing readlink on this platform.'
_DOLLARZERO="$0"
else
_DOLLARZERO=`readlink "$0" 2>/dev/null || echo "$0"`
# only certain platforms support the -e argument for readlink
if [ -n "${_LINUX}${_SOLARIS}${_CYGWIN}" ]; then
_READLINK_ARG="-e"
_DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null || echo "$0"`
elif [ -n "${_DARWIN}" ]; then
_DOLLARZERO=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`
else
_DOLLARZERO=`readlink "$0" 2>/dev/null || echo "$0"`
fi
fi

RHQ_AGENT_BIN_DIR_PATH=`dirname "$_DOLLARZERO"`
Expand Down

0 comments on commit 284763e

Please sign in to comment.