Why does tomcat 7 startup script overwrite chkconfig settings on yum update?

Solution Verified - Updated -

Issue

  • Tomcat 7 RPM provides the startup script /etc/init.d/tomcat
[root@test ~]# yum provides /etc/init.d/tomcat
Loaded plugins: product-id, rhnplugin, search-disabled-repos, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
tomcat-7.0.75-1.el6.noarch : Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
Repo        : epel
Matched from:
Filename    : /etc/init.d/tomcat
  • The stock file contains the following chkconfig configuration:
[root@test ~]# grep chkcon /etc/init.d/tomcat
# chkconfig: - 80 20
  • The above means that a chkconfig --add tomcat will result in tomcat being added to all runlevels in the "off" value:
[root@test ~]# chkconfig --list tomcat
tomcat          0:off   1:off   2:off   3:off   4:off   5:off   6:off
  • However if one modify the chkconfig entry in file /etc/init.d/tomcat script so that, when chkconfig --add tomcat is run, it is automatically in the "on" position in runlevels 2, 3, 4 and 5:
[root@test ~]# grep chkconf /etc/init.d/tomcat
# chkconfig: 2345 80 20
[root@a-app-l-seind03 ~]# chkconfig --list tomcat
tomcat          0:off   1:off   2:on    3:on    4:on    5:on    6:off
  • Upgrade from tomcat-7.0.73-1.el6 to 7.0.75-1.el6 version overwrite, the config change as follows.
[root@test ~]# grep chkcon /etc/init.d/tomcat
# chkconfig: - 80 20
  • Why does this happen?

Environment

  • yum
  • tomcat-7.0.75-1.el6.noarch From EPEL Fedora Project

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content