Bug 1121867

Summary: Getting RPM Tomcat version is not working
Product: [JBoss] JBoss Enterprise Web Server 2 Reporter: Libor Fuka <lfuka>
Component: tomcat6Assignee: Coty Sutherland <csutherl>
Status: CLOSED EOL QA Contact: Libor Fuka <lfuka>
Severity: high Docs Contact:
Priority: high    
Version: 2.1.0CC: jclere, jdoyle, myarboro, pslavice, rsvoboda, weli
Target Milestone: CR01   
Target Release: 2.1.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, when JBoss Enterprise Web Server was installed using RPM, the <filename>/etc/init.d/tomcat{VERSION} version</filename> script did not work as expected for Tomcat 6 and 7. This issue is fixed in JBoss Enterprise Web Server 2.1 and the script option <parameter>version</parameter> now works as expected for both versions of Tomcat.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-13 08:02:20 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: 1120696    

Description Libor Fuka 2014-07-22 05:39:02 UTC
Description of problem:
The scripts /etc/init.d/tomcatX option version is not working. Both RPM tomcat versions are affected.

Version-Release number of selected component (if applicable):
2.1.0-ER4 tomcats RPM

The fix should be:
+++
[root@nec-em11 ~]# diff -u /etc/init.d/tomcat7 /etc/init.d/tomcat7.new
--- /etc/init.d/tomcat7        2014-07-21 11:25:32.000000000 -0400
+++ /etc/init.d/tomcat7.new        2014-07-21 11:25:09.000000000 -0400
@@ -284,7 +284,10 @@
          fi
          ;;
      version)
-        ${TOMCAT_SCRIPT} version
+        parseOptions
+        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} version"
+        #${TOMCAT_SCRIPT} version
          ;;
      *)
          echo "Usage: $0
{start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}"

Comment 1 David Knox 2014-07-22 18:08:18 UTC
new builds added to the associated errata

Comment 2 Michal Haško 2014-08-04 12:53:59 UTC
VERIFIED on:

tomcat6-6.0.41-4_patch_02.ep6.el5
tomcat6-6.0.41-3_patch_02.ep6.el6
tomcat6-6.0.41-4_patch_02.ep6.el7

tomcat7-7.0.54-6_patch_02.ep6.el5
tomcat7-7.0.54-6_patch_02.ep6.el6
tomcat7-7.0.54-4_patch_02.ep6.el7

Comment 3 Mandar Joshi 2014-08-11 14:39:14 UTC
added doc text