Index: head/net-mgmt/flow-tools/Makefile =================================================================== --- head/net-mgmt/flow-tools/Makefile (revision 193320) +++ head/net-mgmt/flow-tools/Makefile (revision 193321) @@ -1,77 +1,77 @@ # New ports collection makefile for: flow-tools # Date created: 2000 Jul 25 # Whom: @BABOLO <.@babolo.ru> # # $FreeBSD$ # PORTNAME= flow-tools PORTVERSION= 0.68 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.eng.oar.net/pub/flow-tools/ MAINTAINER= stas@FreeBSD.org COMMENT= Suite of tools and library to work with netflow data USE_PYTHON_RUN= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+=--localstatedir="${PREFIX}" MAN1= flow-capture.1 flow-cat.1 flow-dscan.1 flow-expire.1 \ flow-export.1 flow-fanout.1 flow-filter.1 flow-gen.1 \ flow-header.1 flow-import.1 flow-mask.1 flow-merge.1 \ flow-nfilter.1 flow-print.1 flow-receive.1 \ flow-report.1 flow-send.1 flow-split.1 flow-stat.1 \ flow-tag.1 flow-tools.1 flow-tools-examples.1 \ flow-xlate.1 flow-rptfmt.1 flow-log2rrd.1 flow-rpt2rrd.1 SUB_FILES= pkg-install pkg-deinstall SUB_LIST= FLOW_CAPTURE_SPOOL="${FLOW_CAPTURE_SPOOL}" \ FLOW_CAPTURE_USER="${FLOW_CAPTURE_USER}" \ FLOW_CAPTURE_GROUP="${FLOW_CAPTURE_GROUP}" \ FLOW_CAPTURE_UID="${FLOW_CAPTURE_UID}" \ FLOW_CAPTURE_GID="${FLOW_CAPTURE_GID}" \ FLOW_CAPTURE_PIDDIR="${FLOW_CAPTURE_PIDDIR}" -USE_RC_SUBR= flow_capture +USE_RC_SUBR= flow_capture flow_fanout VARDIR?= ${DESTDIR}/var FLOW_CAPTURE_SPOOL= ${VARDIR}/db/flows FLOW_CAPTURE_USER= flowtools FLOW_CAPTURE_GROUP= flowtools FLOW_CAPTURE_UID= 174 FLOW_CAPTURE_GID= 174 FLOW_CAPTURE_PIDDIR= ${VARDIR}/run/flow-capture .if defined(WITH_PGSQL) CONFIGURE_ARGS+=--with-pgsql="${PREFIX}" USE_PGSQL= yes .endif .if defined(WITH_MYSQL) CONFIGURE_ARGS+=--with-mysql="${PREFIX}" USE_MYSQL= yes .endif .if defined(WITH_OPENSSL) CONFIGURE_ARGS+=--with-openssl="${OPENSSLBASE}" .endif post-patch: ${REINPLACE_CMD}\ -e 's|@localstatedir@/sym/|${PREFIX}/share/flow-tools/|' \ -e 's|@localstatedir@/cfg/|${PREFIX}/etc/flow-tools/|' \ ${WRKSRC}/docs/flow-*.1.in ${WRKSRC}/docs/flow-*.html.in pre-su-install: @${SETENV} ${SCRIPTS_ENV} \ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: .for I in ${MAN1} ${INSTALL_MAN} ${WRKSRC}/docs/${I} ${PREFIX}/man/man1/ .endfor @${SETENV} ${SCRIPTS_ENV} \ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include Property changes on: head/net-mgmt/flow-tools/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.24 \ No newline at end of property +1.25 \ No newline at end of property Index: head/net-mgmt/flow-tools/files/flow_fanout.in =================================================================== --- head/net-mgmt/flow-tools/files/flow_fanout.in (nonexistent) +++ head/net-mgmt/flow-tools/files/flow_fanout.in (revision 193321) @@ -0,0 +1,105 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: flow_fanout +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable flow-fanout: +# flow_fanout_enable (bool): Set it to "YES" to enable flow-fanout daemon. +# Set to "NO" by default. +# flow_fanout_ip (str): IP address to bind to +# Default to "0.0.0.0" +# flow_fanout_remoteip (str): IP address to accept flows from +# Default to "0.0.0.0" or all IPs +# flow_fanout_port (int): Port to accept flow data on +# Default is "8787" +# flow_fanout_export (str): Where to send flows to. Default is "0/0/8788" +# flow_fanout_flags (str): Custom additional arguments to be passed +# to flow-collector (default ""). +# flow_fanout_profiles (str): A list of configuration profiles to enable. +# This allows you to run several instances of +# flow-fanout with different parameters. +# Consider the following example: +# flow_fanout_enable="YES" +# flow_fanout_ip="85.172.168.9" +# flow_fanout_profiles="r1 r2" +# flow_fanout_r1_port="4444" +# flow_fanout_r1_export="0/0/9500 0/10.5.5.5/9200" +# flow_fanout_r2_port="4445" +# flow_fanout_r2_export="0/0/9551 0/0/9101" +# +# This will run two instances of the flow-fanout +# with parameters taken from appropriate +# flow_fanout_PROFILENAME_xxx variables. For +# unspecified parameters flow_fanout_xxx +# varialbes will be used. + +. /etc/rc.subr + +name="flow_fanout" +rcvar=`set_rcvar` + +setup_profile_vars() +{ + name=flow_fanout_$1 + eval ": \${flow_fanout_${1}_ip=${flow_fanout_ip}}" + eval ": \${flow_fanout_${1}_remoteip=${flow_fanout_remoteip}}" + eval ": \${flow_fanout_${1}_port=${flow_fanout_port}}" + eval ": \${flow_fanout_${1}_export=${flow_fanout_export}}" + eval ": \${flow_fanout_${1}_flags=${flow_fanout_flags}}" + eval "pidfile=${flow_fanout_pid}.\${flow_fanout_${1}_port}" + eval "command_args=\"-p ${flow_fanout_pid} \${flow_fanout_${1}_ip}/\${flow_fanout_${1}_remoteip}/\${flow_fanout_${1}_port} \${flow_fanout_${1}_export}\"" +} + +start_profiles() +{ + unset start_cmd + for _profile in ${flow_fanout_profiles}; do + setup_profile_vars $_profile + run_rc_command "${rc_arg}" + done +} + +stop_profiles() +{ + unset stop_cmd + for _profile in ${flow_fanout_profiles}; do + setup_profile_vars $_profile + run_rc_command "${rc_arg}" + done +} + +load_rc_config $name + +: ${flow_fanout_enable="NO"} +: ${flow_fanout_ip="0.0.0.0"} +: ${flow_fanout_remoteip="0.0.0.0"} +: ${flow_fanout_port="8787"} +: ${flow_fanout_export="0/0/8788"} +: ${flow_fanout_pid="%%FLOW_CAPTURE_PIDDIR%%/flow-fanout.pid"} +: ${flow_fanout_user="flowtools"} +: ${flow_fanout_group="flowtools"} +: ${flow_fanout_flags=""} + +pidfile="${flow_fanout_pid}.${flow_fanout_port}" + +command="%%PREFIX%%/bin/flow-fanout" +command_args="-p ${flow_fanout_pid} ${flow_fanout_ip}/${flow_fanout_remoteip}/${flow_fanout_port} ${flow_fanout_export}" + +cmd="$1" +if [ $# -gt 0 ]; then + shift +fi + +[ -n "$*" ] && flow_fanout_profiles="$*" + +if [ "${flow_fanout_profiles}" ]; then + start_cmd="start_profiles" + stop_cmd="stop_profiles" +fi + +run_rc_command "$cmd" Property changes on: head/net-mgmt/flow-tools/files/flow_fanout.in ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property