Bug 615322

Summary: bug with automatic startup by creating a symlink in /etc/init.d/rhq-agent-wrapper.sh
Product: [Other] RHQ Project Reporter: dsteigne
Component: AgentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED DUPLICATE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: low    
Version: 1.3.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-16 14:07:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dsteigne 2010-07-16 14:04:29 UTC
Description of problem:
Using the documentation at http://www.redhat.com/docs/en-US/JBoss_ON/2.3/html/Installation_Guide/Installation_Guide-JON_Agent_Installation-Preparing_the_Agent.html#Installation_Guide-Preparing_the_Agent-Start_the_Agent, we have successfully installed the jon agent on a RHEL 5.5 x64 bit system. We followed recommendations for automatic startup by creating a symlink in /etc/init.d/rhq-agent-wrapper.sh -> $AGENT_HOME/bin/rhq-agent-wrapper.sh. We used chkconfig to add the script to startup. All of that works well and a unit test of "sudo service rhq-agent-wrapper.sh stop" and "sudo service rhq-agent-wrapper.sh stop" works fine.

However, if you reboot the system completely, you will see that rhq-agent-wrapper.sh has an error near line 126 and it will not start. The reason is that it is executing from /etc/rc3.d/ instead of /etc/init.d/ and it assumes that its launch location is $AGENT_HOME/bin/.

Observe the error:

Starting rhq-agent-wrapper.sh: /etc/rc3.d/S93rhq-agent-wrapper.sh: line 126: cd: ../init.d: No such file or directory
Starting RHQ Agent...

The problem is that the script tries to account for being linked from $AGENT_HOME/bin to /etc/init.d/ but it does not account for being, by nature, linked to /etc/rc3.d/.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 dsteigne 2010-07-16 14:07:11 UTC
Duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=535784

*** This bug has been marked as a duplicate of bug 535784 ***