Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1672027 - Syntax error in SysV init script (nagios-4.4.3-1.el6.x86_64)
Summary: Syntax error in SysV init script (nagios-4.4.3-1.el6.x86_64)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Stephen John Smoogen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1672534 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-03 09:51 UTC by Thomas Bellman
Modified: 2019-02-12 03:58 UTC (History)
15 users (show)

Fixed In Version: nagios-4.4.3-3.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-12 03:58:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.