diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2007-10-27 15:20:34 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2007-10-27 15:20:34 +0800 |
commit | efce365f863ebdd6acd7e9a8a7f46376b756e0ce (patch) | |
tree | 94059dfaa4d381d4c3d19a2ec11451c62fa771d2 /net-mgmt/net-snmp-devel | |
parent | 1afae73e6f69f907db6e67eb10bbdc381f551044 (diff) | |
download | freebsd-ports-gnome-efce365f863ebdd6acd7e9a8a7f46376b756e0ce.tar.gz freebsd-ports-gnome-efce365f863ebdd6acd7e9a8a7f46376b756e0ce.tar.zst freebsd-ports-gnome-efce365f863ebdd6acd7e9a8a7f46376b756e0ce.zip |
- 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)
Diffstat (limited to 'net-mgmt/net-snmp-devel')
-rw-r--r-- | net-mgmt/net-snmp-devel/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/files/snmpd.sh.in | 19 | ||||
-rw-r--r-- | net-mgmt/net-snmp-devel/pkg-message | 3 |
3 files changed, 19 insertions, 5 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile index d97c59a0e2e8..f44730e35ad8 100644 --- a/net-mgmt/net-snmp-devel/Makefile +++ b/net-mgmt/net-snmp-devel/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-snmp-devel/files/snmpd.sh.in b/net-mgmt/net-snmp-devel/files/snmpd.sh.in index b2c7590d8aa4..0af14f41a7b0 100644 --- a/net-mgmt/net-snmp-devel/files/snmpd.sh.in +++ b/net-mgmt/net-snmp-devel/files/snmpd.sh.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmpd.sh.in,v 1.6 2007-03-25 12:35:45 kuriyama Exp $ +# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/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-snmp-devel/pkg-message b/net-mgmt/net-snmp-devel/pkg-message index 4a213e367a42..203b8a6b6ed6 100644 --- a/net-mgmt/net-snmp-devel/pkg-message +++ b/net-mgmt/net-snmp-devel/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" |