Bug 864239 - rhq-agent-env.sh gives example of bad su command
Summary: rhq-agent-env.sh gives example of bad su command
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Launch Scripts
Version: JON 3.1.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
: JON 3.1.2
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 858138
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-09 00:29 UTC by Larry O'Leary
Modified: 2018-11-28 19:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 858138
Environment:
Last Closed: 2013-09-11 10:59:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 218333 0 None None None 2012-10-09 00:29:12 UTC

Description Larry O'Leary 2012-10-09 00:29:11 UTC
+++ This bug was initially created as a clone of RHQ Bug #858138 +++

In rhq-agent-env.sh there is an example of setting RHQ_AGENT_START_COMMAND, which is useful when you use the wrapper script to run it as a service on RHEL. The example is gives is problematic causing it not to work correctly:
  RHQ_AGENT_START_COMMAND="su -m -l user -c '${RHQ_AGENT_HOME}/bin/rhq-agent.sh'"


The -l option overrides -m, and the result is that the environment is not propagated. When using the wrapper script as a SysV init script, the RHQ_AGENT_IN_BACKGROUND variable will be missing, so the pid file will be written into the wrong directly.

Removing the -l option fixes that, but I'm not 100% certain why it was there beyond it being common.

Comment 1 Thomas Segismont 2012-12-10 09:37:13 UTC
commit a9b76bf3cb25a329c00a7084a6f5583105c6b456
Author: Thomas SEGISMONT <tsegismo>
Date:   Mon Dec 10 10:20:00 2012 +0100

    Bug 864239 rhq-agent-env.sh gives example of bad su command
        (cherry-picked from 1cdbda2, bug 858138)
    -l overrides -m behavior in RHQ_AGENT_START_COMMAND example

Comment 2 Simeon Pinder 2012-12-13 19:18:37 UTC
Moving to ON_QA as new build available to test with:
https://brewweb.devel.redhat.com/buildinfo?buildID=247371

Comment 3 Armine Hovsepyan 2012-12-14 14:49:04 UTC
verified in JON 3.1.2 ER5


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