Bug 1102179

Summary: /usr/sbin/tomcat attempts to source /etc/sysconfig/${NAME} but ${NAME} is not defined
Product: [Fedora] Fedora EPEL Reporter: C. Morgan Hamill <chamill>
Component: tomcatAssignee: Ivan Afonichev <ivan.afonichev>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: el6CC: akurtako, ivan.afonichev
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-28 16:04:58 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:

Description C. Morgan Hamill 2014-05-28 14:45:18 UTC
Description of problem:
The script /usr/sbin/tomcat at line 22 attempts the following:

# Get instance specific config file
if [ -r "/etc/sysconfig/${NAME}" ]; then
    . /etc/sysconfig/${NAME}
fi

${NAME} is not defined anywhere in this script nor is it exported by /etc/init.d/tomcat.  As a result, tomcat logs the following to stdout:

/usr/sbin/tomcat: line 22: .: /etc/sysconfig/: is a directory

Two issues:
- The `-r` test might be incorrect, as it succeeds when ${NAME} is undefined.  A check for `! -d` or somethign might be appropriate.
 - The whole bit is (I think) unecessary, as the init script takes care of sourcing /etc/init.d/${NAME}.


Version-Release number of selected component (if applicable):
7.0.33-3

How reproducible:
`service tomcat start; cat /var/log/tomcat/catalina.out`

Actual results:
/usr/sbin/tomcat: line 22: .: /etc/sysconfig/: is a directory

Expected results:
nothin

Additional info:
You're all very good humans.

Comment 1 Ivan Afonichev 2014-05-28 16:04:58 UTC

*** This bug has been marked as a duplicate of bug 1080195 ***