Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net/pfflowd/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- Makefile 14 Sep 2005 23:26:59 -0000 1.9 +++ Makefile 29 Apr 2008 17:32:28 -0000 @@ -6,32 +6,29 @@ # PORTNAME= pfflowd -PORTVERSION= 0.6 +PORTVERSION= 0.7 CATEGORIES= net MASTER_SITES= http://www.mindrot.org/files/pfflowd/ -MAINTAINER= thompsa@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Convert pfsync states to NetFlow datagrams +USE_RC_SUBR= pfflowd.sh + MAN8= pfflowd.8 -PLIST_FILES= sbin/pfflowd \ - etc/rc.d/pfflowd.sh.sample +PLIST_FILES= sbin/pfflowd .include .if ${OSVERSION} < 502106 -IGNORE= "Only for 5.3 and above" +IGNORE= only for 5.3 and above .endif .if ${OSVERSION} < 502119 EXTRA_PATCHES+= ${FILESDIR}/pf34-Makefile .endif -post-patch: - ${SED} -e 's|@@PREFIX@@|${PREFIX}|g' < ${FILESDIR}/pfflowd.sh.sample \ - > ${WRKSRC}/pfflowd.sh.sample - pre-build: ${CAT} ${FILESDIR}/pidfile.h > ${WRKSRC}/pidfile.h ${CAT} ${FILESDIR}/pidfile.c > ${WRKSRC}/pidfile.c @@ -39,6 +36,5 @@ pre-build: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/pfflowd ${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/pfflowd.8 ${PREFIX}/man/man8 - ${INSTALL_SCRIPT} ${WRKSRC}/pfflowd.sh.sample ${PREFIX}/etc/rc.d/pfflowd.sh.sample .include Index: distinfo =================================================================== RCS file: /home/ncvs/ports/net/pfflowd/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 22 Jan 2006 21:23:37 -0000 1.4 +++ distinfo 23 Apr 2008 05:14:56 -0000 @@ -1,3 +1,3 @@ -MD5 (pfflowd-0.6.tar.gz) = c2d7bfff10594ffd3f50a7c54f8d9304 -SHA256 (pfflowd-0.6.tar.gz) = 8e6d34d5e1fe78b58e750cf5108a2ef8f3b49fd2e8f4d0c96eef74ef163c7b00 -SIZE (pfflowd-0.6.tar.gz) = 12925 +MD5 (pfflowd-0.7.tar.gz) = 1789c6d5bf571ae59027b6a2e03b168a +SHA256 (pfflowd-0.7.tar.gz) = 17e5bfe0906db4acaba593764ae1769e8e95f624c7d8d59f04b431393ceb5d56 +SIZE (pfflowd-0.7.tar.gz) = 11317 Index: files/pfflowd.sh.in =================================================================== RCS file: files/pfflowd.sh.in diff -N files/pfflowd.sh.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/pfflowd.sh.in 23 Apr 2008 05:58:20 -0000 @@ -0,0 +1,42 @@ +#!/bin/sh +# $FreeBSD$ +# + +# PROVIDE: pfflowd +# REQUIRE: LOGIN + +# +# Add the following lines to /etc/rc.conf to enable pfflowd: +# +# pfflowd_enable="YES" +# pfflowd_host=":" +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# + +. %%RC_SUBR%% + +name=pfflowd +rcvar=`set_rcvar` + +load_rc_config $name + +# set defaults + +pfflowd_enable=${pfflowd_enable:-"NO"} +pfflowd_host=${pfflowd_host:-"127.0.0.1:2055"} + +command=%%PREFIX%%/sbin/pfflowd +command_args="-n ${pfflowd_host}" +extra_commands=reload + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +pidfile="/var/run/${name}.pid" + +run_rc_command "$1" Index: files/pfflowd.sh.sample =================================================================== RCS file: files/pfflowd.sh.sample diff -N files/pfflowd.sh.sample --- files/pfflowd.sh.sample 25 Feb 2004 16:02:15 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,20 +0,0 @@ -#!/bin/sh - -# Enter the host to send the netflow datagrams to, the format -# is IP:PORT (e.g 127.0.0.1:2055) -host="127.0.0.1:2055" - -case "$1" in - start) - echo -n " pfflowd" - @@PREFIX@@/sbin/pfflowd -n ${host} - ;; - - stop) - if [ ! -f /var/run/pfflowd.pid ]; then - echo "pfflowd not running" - exit 64 - fi - kill `cat /var/run/pfflowd.pid` - ;; -esac