Bug 845608

Summary: rhq-agent-wrapper-ec2 should use the RHQ convention of ".sh" extension
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: AgentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.5CC: hrupp, jshaughn, loleary
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-12 14:59:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Mazzitelli 2012-08-03 14:55:24 UTC
Everywhere in RHQ, whenever we have a script, we put the proper extension on the script name to denote a) its a script and b) what platform that script runs on.

.sh = Linux/UNIX script
.bat =  Windows script.

In the agent, there is this "rhq-agent-wrapper-ec2" that does not follow this convention but it should. It should be named "rhq-agent-wrapper-ec2.sh"

Comment 1 Larry O'Leary 2012-08-13 15:46:07 UTC
I disagree with this. Shell includes are intended to indicate their shell they are compatible with. For Bash and the original Bourne shell, this is .sh. Executable files on the other hand do not require the extension and to ensure the executable is cross-platform, should not include it. This is because on other operating systems the extension is used instead of a file attribute to denote the executable status of the file. For example, in windows we have the rhq-server.bat script yet we should not include the .bat when executing it.

  i.e. On Windows: cd <RHQ_SERVER.HOME>\bin
                   rhq-server start

    On Linux/Unix: cd <RHQ_SERVER_HOME>/bin
                   ./rhq-server start


However, with the use of the extension, this forces us to document the two command completely separately.


  i.e. On Windows: cd <RHQ_SERVER.HOME>\bin
                   rhq-server start

    On Linux/Unix: cd <RHQ_SERVER_HOME>/bin
                   ./rhq-server.sh start

Comment 2 John Mazzitelli 2012-08-13 15:52:30 UTC
nevertheless, the convention for all of the RHQ scripts is to have .sh to indicate they are shell scripts. This BZ was merely to maintain that convention across the product. Otherwise, we have one thing that doesn't have .sh and everything else does. Looks like we are just throwing stuff together ad-hoc (which, in this case, we are :-)

If you'd prefer, make this BZ say all linux scripts should not have any extension.  But the point is - make it consistent.

Comment 3 Larry O'Leary 2012-08-13 16:37:04 UTC
Yes. I see your point and definitely agree.

Comment 4 Jay Shaughnessy 2013-09-12 14:59:10 UTC
We're not going to change this because external teams depend on this file, and the issue is minor (although I agree, it should not have been named this way)