Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2018 19:15:43 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r461328 - in head: . net-mgmt/pmacct net-mgmt/pmacct/files
Message-ID:  <201802091915.w19JFhwT023560@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Fri Feb  9 19:15:42 2018
New Revision: 461328
URL: https://svnweb.freebsd.org/changeset/ports/461328

Log:
  net-mgmt/pmacct: update 1.6.1 -> 1.6.2, allow per-interface instances
  
  PR:		200786
  Submitted by:	Niels Kristensen <niels@kristensen.io>
  Relnotes:	http://www.pmacct.net/ChangeLog-1.6.2

Modified:
  head/UPDATING
  head/net-mgmt/pmacct/Makefile
  head/net-mgmt/pmacct/distinfo
  head/net-mgmt/pmacct/files/pkg-message.in
  head/net-mgmt/pmacct/files/pmacctd.in
  head/net-mgmt/pmacct/pkg-plist

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Fri Feb  9 19:05:04 2018	(r461327)
+++ head/UPDATING	Fri Feb  9 19:15:42 2018	(r461328)
@@ -5,6 +5,19 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20180209:
+  AFFECTS: users of net-mgmt/pmacct
+  AUTHOR: pi@FreeBSD.org
+
+  To allow separete pmacctd instances per interface, use
+
+    pmacctd_enable="YES"
+    pmacctd_interfaces="re1 re2"
+
+  in /etc/rc.conf. The path to the config files will be
+
+    /usr/local/etc/pmacct/<interface>
+
 20180208:
   AFFECTS: users of mail/mailman*
   AUTHOR: mandree@FreeBSD.org

Modified: head/net-mgmt/pmacct/Makefile
==============================================================================
--- head/net-mgmt/pmacct/Makefile	Fri Feb  9 19:05:04 2018	(r461327)
+++ head/net-mgmt/pmacct/Makefile	Fri Feb  9 19:15:42 2018	(r461328)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	pmacct
-DISTVERSION=	1.6.1
+DISTVERSION=	1.6.2
 PORTREVISION=	0
 CATEGORIES=	net-mgmt
 MASTER_SITES=	http://www.pmacct.net/

Modified: head/net-mgmt/pmacct/distinfo
==============================================================================
--- head/net-mgmt/pmacct/distinfo	Fri Feb  9 19:05:04 2018	(r461327)
+++ head/net-mgmt/pmacct/distinfo	Fri Feb  9 19:15:42 2018	(r461328)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1490125463
-SHA256 (pmacct-1.6.1.tar.gz) = eb332a6812d1e02134900a1d115a24f315de7c861a9b63093c1226753486cbe7
-SIZE (pmacct-1.6.1.tar.gz) = 1280968
+TIMESTAMP = 1518121340
+SHA256 (pmacct-1.6.2.tar.gz) = e6ede7f500fb1771b5cdfb63dfa016e34c19b8aa2d2f672bd4c63016a5d6bbe2
+SIZE (pmacct-1.6.2.tar.gz) = 1311678

Modified: head/net-mgmt/pmacct/files/pkg-message.in
==============================================================================
--- head/net-mgmt/pmacct/files/pkg-message.in	Fri Feb  9 19:05:04 2018	(r461327)
+++ head/net-mgmt/pmacct/files/pkg-message.in	Fri Feb  9 19:15:42 2018	(r461328)
@@ -3,11 +3,12 @@ Please note that this port requires configuration befo
 
 Add these to /etc/rc.conf:
 pmacctd_enable="YES"
-pmacctd_flags="-Df %%PREFIX%%/etc/pmacctd.conf -i <interface>"
+pmacctd_interfaces="em0 em1"
 
-Configuration examples are located in %%EXAMPLESDIR%%.  You must copy
-one of these to %%PREFIX%%/etc/pmacctd.conf and make any required edits
-for your environment.
+Configuration examples are located in %%EXAMPLESDIR%%.
+
+You should copy one of these to %%PREFIX%%/etc/pmacct/<interface>
+and adapt them for your environment.
 
 Database-related files/information can be found in %%DATADIR%%.
 

Modified: head/net-mgmt/pmacct/files/pmacctd.in
==============================================================================
--- head/net-mgmt/pmacct/files/pmacctd.in	Fri Feb  9 19:05:04 2018	(r461327)
+++ head/net-mgmt/pmacct/files/pmacctd.in	Fri Feb  9 19:15:42 2018	(r461328)
@@ -4,35 +4,61 @@
 #
 
 # PROVIDE: pmacctd
-# REQUIRE: NETWORKING
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
 # KEYWORD: shutdown
 
-#
-# Add the following lines to /etc/rc.conf to enable pmacctd:
-#
-# pmacctd_enable="YES"
-#
 # You can define flags for pmacctd running. 
 # See http://wiki.pmacct.net/OfficialConfigKeys for more details.
 #
-# Example:
-# pmacctd_flags="-f %%PREFIX%%/etc/pmacctd.conf -i em0"
+# pmacctd_enable (bool):	Set to YES to enable pmacctd
+#				Default: NO
+# pmacctd_flags (str):		Extra flags passed to pmacctd
+#				Default: -D
+# pmacctd_conf (str):		pmacctd configuration file
+#				Default: %%PREFIX%%/etc/pmacctd.conf
 #
-# Default flags: -f %%PREFIX%%/etc/pmacctd.conf
+# To enable multi interface, use:
+# pmacctd_interfaces="em0 em1"
 #
+# defaults will follow, pmacctd_conf becomes 'pmacctd_em0_conf', etc.
 
 . /etc/rc.subr
 
-name=pmacctd
+name="pmacctd"
 rcvar=pmacctd_enable
 
-command=%%PREFIX%%/sbin/$name
-command_args="-D"
+command="%%PREFIX%%/sbin/$name"
 
-# set defaults
+load_rc_config $name
 
-pmacctd_enable=${pmacctd_enable:-"NO"}
-pmacctd_flags=${pmacctd_flags:-"-f %%PREFIX%%/etc/pmacctd.conf"}
 
-load_rc_config $name
-run_rc_command "$1"
+[ -z "$pmacctd_enable" ]    && pmacctd_enable="NO"
+[ -z "$pmacctd_conf" ]      && pmacctd_conf="%%PREFIX%%/etc/pmacctd.conf"
+[ -z "$pmacctd_flags" ]     && pmacctd_flags="-D"
+
+[ -n "$pmacctd_conf" ]      && pmacctd_flags="$pmacctd_flags -f $pmacctd_conf"
+
+if [ -n "$pmacctd_interfaces" ]; then
+    _1=$1
+    if [ $# -gt 1 ]; then shift; pmacctd_interfaces=$*; fi
+    pmacctd_conf=""
+    pmacctd_flags=""
+    rc=0
+    for i in ${pmacctd_interfaces}; do
+	eval _conf=\$pmacctd_${i}_conf
+	eval _flags=\$pmacctd_${i}_flags 
+	[ -z "$_conf" ] && _conf="%%PREFIX%%/etc/pmacct/$i"
+	[ -z "$_flags" ] && _flags="-D"
+	eval pidfile="/var/run/pmacct/${i}.pid"
+
+	command_args="$_flags -F $pidfile -f $_conf -i $i"
+	run_rc_command "$_1"
+	if [ $? -ne 0 ]; then rc=1; fi  
+	unset _pidcmd _rc_restart_done
+    done
+    exit $rc
+else
+    run_rc_command "$1"
+fi
+

Modified: head/net-mgmt/pmacct/pkg-plist
==============================================================================
--- head/net-mgmt/pmacct/pkg-plist	Fri Feb  9 19:05:04 2018	(r461327)
+++ head/net-mgmt/pmacct/pkg-plist	Fri Feb  9 19:15:42 2018	(r461328)
@@ -24,6 +24,7 @@ sbin/sfacctd
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/agent_to_peer.map.example
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/allow-list.example
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/amqp/amqp_receiver.py
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/avro/avro_file_decoder.py
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/bgp_md5.lst.example
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/flow_to_rd.map.example
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/gnuplot-example.sh
@@ -52,9 +53,9 @@ sbin/sfacctd
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/sampling.map.example
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/tee_receivers.lst.example
 %%DATADIR%%/README.64bit
+%%DATADIR%%/README.GeoIP
 %%DATADIR%%/README.IPv6
 %%DATADIR%%/README.cos
-%%DATADIR%%/README.country
 %%DATADIR%%/README.custom_primitives
 %%DATADIR%%/README.etype
 %%DATADIR%%/README.export_proto



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802091915.w19JFhwT023560>