summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp53
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2007-10-27 07:20:34 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2007-10-27 07:20:34 +0000
commita6a2f0dd823b1a24cf29e7d0ea60937074418b98 (patch)
tree05905b67b97a4a971681f92aff97ac906f28a08e /net-mgmt/net-snmp53
parentUpdate to 0.12.01 (diff)
- Support multiple files in ${snmp_conffile} variable (1).
- Update pkg-message to reflect recent rc.conf variable usage. PR: ports/112766 (1) Submitted by: Royce Williams<royce@alaska.net> (1)
Notes
Notes: svn path=/head/; revision=202126
Diffstat (limited to 'net-mgmt/net-snmp53')
-rw-r--r--net-mgmt/net-snmp53/Makefile2
-rw-r--r--net-mgmt/net-snmp53/files/snmpd.sh.in19
-rw-r--r--net-mgmt/net-snmp53/pkg-message3
3 files changed, 19 insertions, 5 deletions
diff --git a/net-mgmt/net-snmp53/Makefile b/net-mgmt/net-snmp53/Makefile
index d97c59a0e2e8..f44730e35ad8 100644
--- a/net-mgmt/net-snmp53/Makefile
+++ b/net-mgmt/net-snmp53/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.3.1
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
diff --git a/net-mgmt/net-snmp53/files/snmpd.sh.in b/net-mgmt/net-snmp53/files/snmpd.sh.in
index 08b42edbf3c7..09db428eb9b2 100644
--- a/net-mgmt/net-snmp53/files/snmpd.sh.in
+++ b/net-mgmt/net-snmp53/files/snmpd.sh.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp53/files/Attic/snmpd.sh.in,v 1.6 2007-03-25 12:35:45 kuriyama Exp $
+# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp53/files/Attic/snmpd.sh.in,v 1.7 2007-10-27 07:20:34 kuriyama Exp $
#
# PROVIDE: snmpd
# REQUIRE: DAEMON
@@ -52,14 +52,27 @@ case "${snmpd_flags}" in
;;
esac
+for conffile in ${snmpd_conffile}; do
+ if [ ! -z ${conffile} -a -f ${conffile} ]; then
+ if [ -z ${snmpd_conffile_set} ]; then
+ snmpd_conffile_set="${conffile}"
+ else
+ snmpd_conffile_set="${snmpd_conffile_set},${conffile}"
+ fi
+ else
+ echo "snmpd configuration file $conffile not set or not found."
+ exit 1
+ fi
+done
+
case "${snmpd_flags}" in
*-c\ *)
echo "Warning: \$snmpd_flags includes -c option." \
"Please use \$snmpd_conffile instead."
;;
*)
- if [ ! -z "${snmpd_conffile}" -a -f ${snmpd_conffile} ]; then
- snmpd_flags="-c ${snmpd_conffile} ${snmpd_flags}"
+ if [ ! -z "${snmpd_conffile_set}" ]; then
+ snmpd_flags="-c ${snmpd_conffile_set} ${snmpd_flags}"
fi
;;
esac
diff --git a/net-mgmt/net-snmp53/pkg-message b/net-mgmt/net-snmp53/pkg-message
index 4a213e367a42..203b8a6b6ed6 100644
--- a/net-mgmt/net-snmp53/pkg-message
+++ b/net-mgmt/net-snmp53/pkg-message
@@ -4,7 +4,8 @@
lines into /etc/rc.conf.
snmpd_enable="YES"
- snmpd_flags="-a -p /var/run/snmpd.pid"
+ snmpd_flags="-a"
+ snmpd_conffile="/usr/local/share/snmpd.conf /etc/snmpd.conf"
snmptrapd_enable="YES"
snmptrapd_flags="-a -p /var/run/snmptrapd.pid"