Red Hat Bugzilla – Bug 953712
rhq-agent-wrapper.sh status returns an exit value of 1 when the agent is not running
Last modified: 2013-09-03 12:33:01 EDT
Description of problem:
Executing "rhq-agent-wrapper.sh status" when the agent is not running returns a value 1. Non-zero exit values should only be used when there is some error condition. This can/does cause problems for other scripts that call rhq-agent-wrapper.sh.
I stumbled onto this while working on the rhqctl script (being developed in the feature/cassandra-backend branch). It is currently causing an exception in the Java code that invokes the script due to the non-zero exit value.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Make sure your agent is not running
2. Execute "rhq-agent-wrapper.sh status"
3. Execute "echo $?" and you will see a 1 printed to the terminal.
Fixed pushed to master.
commit hash: 69bf1f9b71
verification screenshot is attached.
Created attachment 739955 [details]