Bug 33571 - "snmpd status" always returns 0 in ucd-snmp-4.2-9
Summary: "snmpd status" always returns 0 in ucd-snmp-4.2-9
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ucd-snmp
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2001-03-28 04:22 UTC by Matt Domsch
Modified: 2005-10-31 22:00 UTC (History)
5 users (show)

Clone Of:
Last Closed: 2001-03-28 04:40:50 UTC

Attachments (Terms of Use)

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

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