Bug 1672027

Summary: Syntax error in SysV init script (nagios-4.4.3-1.el6.x86_64)
Product: [Fedora] Fedora EPEL Reporter: Thomas Bellman <bellman>
Component: nagiosAssignee: Stephen John Smoogen <smooge>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: el6CC: affix, alec.keeler, athmanem, b.heden, herrold, jose.p.oliveira.oss, lemenkov, mails.bugzilla.redhat.com, mh, redhat, shawn.starr, smooge, smooge, s, swilkerson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nagios-4.4.3-3.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-12 03:58:24 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 Thomas Bellman 2019-02-03 09:51:57 UTC
Description of problem:

There is a syntax error in the /etc/rc.d/init.d/nagios init script for
the latest update of Nagios in EPEL-6:

    # service nagios status
    /etc/init.d/nagios: line 153: syntax error near unexpected token `}'
    /etc/init.d/nagios: line 153: `}'

This is in the 'printstatus_nagios' function, which looks like

    printstatus_nagios ()
    {
	    if status_nagios; then              # <-- Spurious line
	    status_nagios $1 $2
	    RETVAL=$?
	    if [ $RETVAL = 0 ]; then
		    echo "nagios (pid $NagiosPID) is running..."
	    else
		    echo "nagios is not running"
	    fi
	    return $RETVAL
    }

The first line in the body ('if status_nagios; then'; I have marked it
with an arrow above) shouldn't be there.  If I comment it out, the init
script works as it should.

This would cause Nagios to not start after a reboot.


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

4.4.3-1.el6.x86_64

Comment 1 Stephen John Smoogen 2019-02-05 10:55:05 UTC
*** Bug 1672534 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2019-02-05 15:21:37 UTC
nagios-4.4.3-3.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-973d5749b1

Comment 3 Stephen John Smoogen 2019-02-05 15:24:21 UTC
Please test and if you have a Fedora account leave Karma on  https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-973d5749b1 so it can be pushed to stable sooner than 2 weeks. My apologies for missing this blatant bug.

Comment 4 Fedora Update System 2019-02-08 00:26:15 UTC
nagios-4.4.3-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-973d5749b1

Comment 5 Fedora Update System 2019-02-12 03:58:24 UTC
nagios-4.4.3-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.