Why does tomcat 7 startup script overwrite chkconfig settings on yum update?
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
chkconfigconfiguration:
[root@test ~]# grep chkcon /etc/init.d/tomcat
# chkconfig: - 80 20
- The above means that a
chkconfig --add tomcatwill result intomcatbeing 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
chkconfigentry in file/etc/init.d/tomcatscript so that, whenchkconfig --add tomcatis 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.el6to7.0.75-1.el6version overwrite, the config change as follows.
[root@test ~]# grep chkcon /etc/init.d/tomcat
# chkconfig: - 80 20
- Why does this happen?
Environment
yumtomcat-7.0.75-1.el6.noarchFrom EPEL Fedora Project
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
