Bug 615322 - bug with automatic startup by creating a symlink in /etc/init.d/rhq-agent-wrapper.sh
Summary: bug with automatic startup by creating a symlink in /etc/init.d/rhq-agent-wra...
Status: CLOSED DUPLICATE of bug 535784
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
(Show other bugs)
Version: 1.3.1
Hardware: All Linux
low
medium vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Corey Welton
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-16 14:04 UTC by dsteigne
Modified: 2010-07-16 14:07 UTC (History)
0 users

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: ---


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.