Bug 845608 - rhq-agent-wrapper-ec2 should use the RHQ convention of ".sh" extension
rhq-agent-wrapper-ec2 should use the RHQ convention of ".sh" extension
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
4.5
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-03 10:55 EDT by John Mazzitelli
Modified: 2013-09-12 10:59 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-12 10:59:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2012-08-03 10:55:24 EDT
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 11:46:07 EDT
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 11:52:30 EDT
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 12:37:04 EDT
Yes. I see your point and definitely agree.
Comment 4 Jay Shaughnessy 2013-09-12 10:59:10 EDT
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)

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