Hide Forgot
Description of problem: rhq-agent-wrapper.sh doesn't works when referenced by a symlink on RHEL 4.x OS. Version-Release number of selected component (if applicable): tested on versions 3.x and 4.x How reproducible: Create a symlink in /etc/init.d/ pointing to RHQ_AGENT_HOME/bin/rhq-agent-wrapper.sh on a RHEL 4.x OS box. Steps to Reproduce: 1. Try to start the agent using the symlink (eg. /etc/init.d/rhq-agent) 2. 3. Actual results: The agent wont start correctly. Expected results: Agent statup ok. Additional info: I think the problem occurs due the use of '-e' parameter of readlink command in this part of wrapper script: " ... # ------------------------------- # Get the location of this script. # Make sure we take into account the possibility $0 # is a symlink to the real agent installation script. # Only certain platforms support the -e option of readlink if [ "x${_LINUX}${_SOLARIS}${_CYGWIN}" != "x" ]; then _READLINK_ARG="-e" fi _DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null|| echo "$0"` RHQ_AGENT_WRAPPER_BIN_DIR_PATH=`dirname "$_DOLLARZERO"` ... " As the comment says (# Only certain platforms support the -e option of readlink...), RHEL 4 is one of the OS doesn't supports it. IMO the '-e' flag is not necessary, at least, when running on Linux OS.
Here is the bug which added the -e flag https://bugzilla.redhat.com/show_bug.cgi?id=535784