Bug 216175 - net-mgmt/net-snmp problematic $snmpd_conffile in pkg-message
Summary: net-mgmt/net-snmp problematic $snmpd_conffile in pkg-message
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ryan Steinmetz
Depends on:
Reported: 2017-01-17 11:11 UTC by yongjhen
Modified: 2020-09-12 13:04 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (zi)


Note You need to log in before you can comment on or make changes to this bug.
Description yongjhen 2017-01-17 11:11:48 UTC
With default PREFIX="/usr/local", pkg-message suggests:

snmpd_conffile="/usr/local/share/snmp/snmpd.conf /etc/snmpd.conf"

But by default snmpd also searches and reads snmpd.conf from the following directories:

If a user choose to use "/usr/local/share/snmp/snmpd.conf",
that file would be read and processed twice, which is unnecessary,
or sometimes causes snmpd unable to start.

For example in "/usr/local/share/snmp/snmpd.conf.example",
the following line configure listening address:

agentAddress  udp:

If it is in "/usr/local/share/snmp/snmpd.conf", snmpd will bind on udp: twice and fail with log messages:

"Error opening specified endpoint "udp:"
Server Exiting with code 1"

I suggest change $snmpd_conffile in pkg-mesasge.in to:
snmpd_conffile="%%PREFIX%%/etc/snmpd.conf /etc/snmpd.conf"

Or something not conflict with the above default search paths.
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-14 03:49:39 UTC
Maintainer feedback?