Bug 33571

Summary: "snmpd status" always returns 0 in ucd-snmp-4.2-9
Product: [Retired] Red Hat Linux Reporter: Matt Domsch <matt_domsch>
Component: ucd-snmpAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: edward_blazek, john_hull, mark_rusk, msw, notting
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-28 04:40:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Matt Domsch 2001-03-28 04:22:30 UTC
When we do "snmpd status", it always return 0 inspite of snmpd not 
running. This is a bug in /etc/rc.d/init.d/snmpd startup script. In the 
script, "RETVAL" environment variable is not properly set for status.
Basically, status() returns 3 in this case, but then 0 is returned from 
the script.  RETVAL needs to get set after calling status().

Because of this, dellomsa cannot check the correct status of snmpd and it 
will not start snmpd if it not already started.

Patch to /etc/rc.d/init.d/snmpd is here.  As this is a trivial yet 
functionally necessary change, Dell would like to see this addressed.

--- snmpd.orig  Tue Mar 27 21:44:11 2001
+++ snmpd       Tue Mar 27 22:18:43 2001
@@ -68,6 +68,7 @@
         status snmpd
+       RETVAL=$?
        echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"

Comment 1 Matt Wilson 2001-03-28 04:40:46 UTC