Red Hat Bugzilla – Bug 535803
Improvement in rhq-agent-wrapper.sh to be able to use on all linux distributions
Last modified: 2009-10-12 08:32:00 EDT
The current rhq-agent-wrapper.sh script is not capable to be used directly as a startup script. The lookup of the scriptname with readlink "readlink isn't recursive.
The error can be reproduced by creating a link from /etc/init.d/rhq-agent -> mypathToTheScript
And if you now add the /etc/init.d/rhq-agent into the rcX.d folder with the typical symlink the startup will fail
rhq-agent-wrapper.sh should be changed from
_DOLLARZERO=`readlink "$0" || echo "$0"`
_DOLLARZERO=`readlink -f "$0" || echo "$0"`
The -f forces that all symlinks get recusivly resolved until a proper file is reached.
Here the patch for the wrapper script
Sorry found this related issue to late:
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2461
Imported an attachment (id=368801)
This bug duplicates RHQ-2444