Created attachment 377691 [details] [PATCH] Fix status return code and nagios.pid SELinux context. Description of problem: /etc/init.d/nagios status always returns 0, even when nagios is not running. Version-Release number of selected component (if applicable): nagios-3.2.0-2.fc12.x86_64 How reproducible: Always Steps to Reproduce: 1. Stop nagios 2. Run /etc/init.d/nagios status 3. echo $? Actual results: Returns 0 Expected results: Return non-zero status. Additional info: The initscript included in the nagios tarball is honestly kind of a nightmare, but the attached patch fixes the issue for now. The patch also includes Daniel Walsh's SELinux-related fix from bug #539963.
Reassigning to new owners.
In the attached patch, the if [ $RETVAL = 0]; then maybe should be if [ $RETVAL = 0 ]; then
Created attachment 389690 [details] Fix status return code and nagios.pid SELinux context. Good catch, here's a new patch with your fix.
Ping, any update on this? This is breaking tools (like puppet) that depend on the return status of initscripts to tell if nagios is running, and the SELinux issue is making the initscript fail on machines with SELinux enforcing.
I'll fix it very soon. Thanks you for patch.
nagios-3.2.0-4.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/nagios-3.2.0-4.fc12
nagios-3.2.0-4.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/nagios-3.2.0-4.fc13
nagios-3.2.0-4.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/nagios-3.2.0-4.fc11
nagios-3.2.0-4.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update nagios'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-2903
nagios-3.2.0-4.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update nagios'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-2917
nagios-3.2.0-4.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update nagios'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F13/FEDORA-2010-2957
nagios-3.2.0-4.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
nagios-3.2.0-4.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
nagios-3.2.0-4.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.