Bug 1083557
Summary: | rhq-server.sh internal script fails when executed in Bourne shell (sh) rather then Bourne Again SHell (bash) | ||
---|---|---|---|
Product: | [JBoss] JBoss Operations Network | Reporter: | Tom Fonteyne <tfonteyn> |
Component: | Installer | Assignee: | John Mazzitelli <mazz> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | JON 3.2 | CC: | bkramer, loleary, mazz, skondkar, stephan.vollmer |
Target Milestone: | DR01 | ||
Target Release: | JON 3.2.2 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-07-29 00:16:57 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1083572 |
Description
Tom Fonteyne
2014-04-02 13:08:13 UTC
To be clear, this issue is not limited to Solaris 10. This issue is a result of using /bin/sh as the command interpreter. /bin/sh is Bourne shell while /bin/bash is Bourne Again SHell. The scripts appear to be written for BASH as their target. The default file system layout for many operating systems do not install /bin/sh by default. As such, the system installed/default command interpreter creates a symbolic link to itself as /bin/sh. Meaning: /bin/sh -> /bin/bash However, if /bin/sh is really installed, it will be used. In the case of rhq-server.sh (and the other JBoss ON scripts) we define the command interpreter as: #!/bin/sh That being said, I think that we should probably aim for making the scripts work with Bourne shell as it is still in use by some of the supported platforms used today. needed to fix rhq-agent-wrapper.sh, rhq-server.sh, and rhq-data-migration.sh since they all used the $() syntax. git commit to master: 6cfdf2d since this is targeted for 3.2.2, I fixed this in release/jon3.2.x branch as well. There was only one file that needed to be fixed in this branch (rhq-server.sh), the other files hadn't yet used the bad syntax). release/3.2.x commit: ea6fdbd forgot to fix rhqctl script - committed that fix to master: 1b82fcd5c1e557e4d76cb367bf029c9dca2cb461 Via product triage, determined that this bug is to be included for DR01 target milestone. The update script "apply-updates.sh" for JON 3.2.0 Update 01 is also affected by this problem. This script uses the Bash-specific "if [[ ... ]]" syntax. When the script is run on Ubuntu 12.04 LTS, error messages like ./apply-updates.sh: 48: ./apply-updates.sh: [[: not found are displayed. This happens because Ubuntu uses Dash instead of Bash for /bin/sh. Moving to ON_QA as available for test in latest cumulative patch build(DR01): http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.2.GA/5-29-2014/ Reproduced the issue on JBoss ON 3.2 GA when running 'rhqctl install' on solaris 10 box. Applied 3.2.0.GA-Update-02 and tried 'rhqctl install'. The installer completed without error. Marking this bug as verified. This has been verified and released in Red Hat JBoss Operations Network 3.2 Update 02 (3.2.2) available from the Red Hat Customer Portal[1]. [1]: https://access.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=31783 |