Description of problem: Wrapper script assumes all Linux releases support -e for readlink. So if you link /etc/init.d/rhq-agent to a different location, the wrapper won't find the home directory. Version-Release number of selected component (if applicable): $ cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant Update 8) How reproducible: Always Steps to Reproduce: 1. Install agent on RHEL 5.4 machine 2. Link from /etc/init.d/rhq-agent to /usr/local/rhq-agent 3. Attempt to start agent from /etc/init.d Actual results: $ /etc/init.d/rhq-agent stop rhq-agent-wrapper.sh: RHQ_AGENT_WRAPPER_BIN_DIR_PATH=/etc/init.d rhq-agent-wrapper.sh: pidfile will be located at /etc/bin/rhq-agent.pid RHQ Agent (no pidfile) is NOT running Additional info: -e introduced in RHEL 5.5 Unclear -e is really needed, -f is probably OK. Patch @@ -117,9 +117,10 @@ esac # 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 +# -e option not supported on RHEL 5.4 +# if [ "x${_LINUX}${_SOLARIS}${_CYGWIN}" != "x" ]; then + # _READLINK_ARG="-e" +# fi
I'm not suggesting that patch is any good, but it's what I did to make it work. Maybe you can do 'readlink -e' and if that fails 'readlink -f' and then give up?