
| Key: |
RHQ-2444
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Mark Burchard
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Reproduced on RHEL 5.3 and 5.4
|
|
Issue Links:
|
Duplicate
|
|
|
|
This issue Is Duplicated By:
|
|
RHQ-2461
Improvement in rhq-agent-wrapper.sh to be able to use on all linux distributions
|
|
|
|
|
|
|
| Date of First Response: |
12/Oct/09 07:34 AM
|
|
Line 102 of rhq-agent-wrapper.sh needs to be modified with after -e (Canonical, exists) after the readlink command, eg.
# -------------------------------
# Get the location of this script.
# Make sure we take into account the possibility $0
# is a symlink to the real agent installation script.
_DOLLARZERO=`readlink -e "$0" || echo "$0"`
This is because, at least under RHEL using chkconfig, the script called by init is a symlink to another symlink, the /etc/init.d/rhq-agent-wrapper -> /path/to/real/wrapper/file. This causes the following to happen:
#
# ../rc3.d/S93rhq-agent-wrapper.sh start
#
++ readlink ../rc3.d/S93rhq-agent-wrapper.sh
#
+ _DOLLARZERO=../init.d/rhq-agent-wrapper.sh
#
++ dirname ../init.d/rhq-agent-wrapper.sh
#
+ RHQ_AGENT_WRAPPER_BIN_DIR_PATH=../init.d
Adding the -e option corrects this..
We also need to add some platform-check logic before this, as at least Solaris readlink does not support the -e option.
-Mark
|
|
Description
|
Line 102 of rhq-agent-wrapper.sh needs to be modified with after -e (Canonical, exists) after the readlink command, eg.
# -------------------------------
# Get the location of this script.
# Make sure we take into account the possibility $0
# is a symlink to the real agent installation script.
_DOLLARZERO=`readlink -e "$0" || echo "$0"`
This is because, at least under RHEL using chkconfig, the script called by init is a symlink to another symlink, the /etc/init.d/rhq-agent-wrapper -> /path/to/real/wrapper/file. This causes the following to happen:
#
# ../rc3.d/S93rhq-agent-wrapper.sh start
#
++ readlink ../rc3.d/S93rhq-agent-wrapper.sh
#
+ _DOLLARZERO=../init.d/rhq-agent-wrapper.sh
#
++ dirname ../init.d/rhq-agent-wrapper.sh
#
+ RHQ_AGENT_WRAPPER_BIN_DIR_PATH=../init.d
Adding the -e option corrects this..
We also need to add some platform-check logic before this, as at least Solaris readlink does not support the -e option.
-Mark |
Show » |
|