View Issue Details

IDProjectCategoryView StatusLast Update
0015784CentOS-6-OTHERpublic2019-03-10 18:23
ReporterFireMaster 
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionno change required 
Platformx86_64OSCentOS 6OS Version6.10
Product Version6.10 
Target VersionFixed in Version 
Summary0015784: broken /etc/init.d/nagios script
DescriptionHello. This week I update nagios and nagios-common from epel release and init.d script for nagios restart is broken. I try to remove and install clean the packages again, I still have the problem.

[root@nagios ~]# /etc/init.d/nagios
/etc/init.d/nagios: line 153: syntax error near unexpected token `}'
/etc/init.d/nagios: line 153: `}'

The version of packages are:

nagios-common-4.4.3-1.el6.x86_64
nagios-4.4.3-1.el6.x86_64

TagsNo tags attached.

Activities

1midniterider

1midniterider

2019-02-08 19:48

reporter   ~0033796

I think I see the issue… Make sure you back up the new init.d script, then, in the new init.d script, search for printstatus_nagios you should see this:
 
printstatus_nagios ()
{
       if status_nagios; then
       status_nagios $1 $2
       RETVAL=$?
       if [ $RETVAL = 0 ]; then
              echo "nagios (pid $NagiosPID) is running..."
       else
              echo "nagios is not running"
       fi
       return $RETVAL
}
 
Change it to this:
 
printstatus_nagios ()
{
       if status_nagios; then
              status_nagios $1 $2
       fi
       RETVAL=$?
       if [ $RETVAL = 0 ]; then
              echo "nagios (pid $NagiosPID) is running..."
       else
              echo "nagios is not running"
       fi
       return $RETVAL
}
FireMaster

FireMaster

2019-02-11 12:51

reporter   ~0033802

Dear 1midniterider,
thanks for you reply.

Everything works correctly now. Many thanks for the help.

Best wishes.
1midniterider

1midniterider

2019-02-11 17:07

reporter   ~0033804

No worries
avij

avij

2019-03-10 18:23

manager   ~0033973

Issues with EPEL packages should be reported to bugzilla.redhat.com > Fedora > Fedora EPEL, not here. Apparently this was fixed in nagios-4.4.3-3.el6 as seen here: https://bugzilla.redhat.com/show_bug.cgi?id=1672027

Issue History

Date Modified Username Field Change
2019-02-05 12:14 FireMaster New Issue
2019-02-08 19:48 1midniterider Note Added: 0033796
2019-02-11 12:51 FireMaster Note Added: 0033802
2019-02-11 17:07 1midniterider Note Added: 0033804
2019-03-10 18:23 avij Status new => closed
2019-03-10 18:23 avij Resolution open => no change required
2019-03-10 18:23 avij Note Added: 0033973