Bug 165673

Summary: missing support of /etc/sysconfig/snmpd
Product: Red Hat Enterprise Linux 4 Reporter: Peter Bieringer <pb>
Component: net-snmpAssignee: Radek Vokál <rvokal>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-08-18 08:26:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Bieringer 2005-08-11 10:44:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

Description of problem:
/etc/rc.d/init.d/snmpd doesn't support /etc/sysconfig/snmpd to get options for starting the daemon.
This would be required for e.g. specifying a dedicated listening address (e.g. for security reasons) like described in man page:

SNMPD(8)                                                                  Net-SNMP                                                                  SNMPD(8)

NAME
       snmpd - daemon to respond to SNMP request packets.

SYNOPSIS
       snmpd [OPTIONS] [LISTENING ADDRESSES]



Version-Release number of selected component (if applicable):
net-snmp-5.1.2-11

How reproducible:
Always

Steps to Reproduce:
1. Try to bind snmpd to a dedicated listening address for security reasons
  

Actual Results:  Have to patch initscript

Workaround is to patch the initscript file:

--- /etc/rc.d/init.d/snmpd.orig 2005-08-11 12:37:24.732319782 +0200
+++ /etc/rc.d/init.d/snmpd      2005-08-11 12:38:04.235639177 +0200
@@ -12,7 +12,7 @@
 # source function library
 . /etc/init.d/functions

-OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a"
+OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a 192.0.2.1"
 RETVAL=0
 prog="snmpd"



Expected Results:  Instead of patching initscript, add/change a variable in /etc/sysconfig/snmpd

Additional info:

Comment 1 Radek Vokál 2005-08-18 08:26:25 UTC
I think this can be set inside /etc/snmp/snmpd.conf by specifing agentadress
option. 

Comment 2 Peter Bieringer 2005-08-18 08:52:42 UTC
Thank you for that hint, haven't seen in man page.
Perhaps a hint in config would be good:

#### Bind snmpd to localhost address only (optional)
# agentaddress localhost:161