diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2008-05-26 09:51:09 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2008-05-26 09:51:09 +0000 |
commit | b2a708f11557eac41ae072ec6682e967672e9039 (patch) | |
tree | da763fc9e934e11023b429f6e9a8e4ae3a6d2881 /net/pfflowd | |
parent | ae9b0dc73a9ef8c726ab775c7be899fa5af46ce7 (diff) | |
download | ports-b2a708f11557eac41ae072ec6682e967672e9039.tar.gz ports-b2a708f11557eac41ae072ec6682e967672e9039.zip |
Notes
Diffstat (limited to 'net/pfflowd')
-rw-r--r-- | net/pfflowd/Makefile | 18 | ||||
-rw-r--r-- | net/pfflowd/distinfo | 6 | ||||
-rw-r--r-- | net/pfflowd/files/pfflowd.in | 42 | ||||
-rw-r--r-- | net/pfflowd/files/pfflowd.sh.sample | 20 |
4 files changed, 54 insertions, 32 deletions
diff --git a/net/pfflowd/Makefile b/net/pfflowd/Makefile index 565a07888987..05828a45cad8 100644 --- a/net/pfflowd/Makefile +++ b/net/pfflowd/Makefile @@ -6,31 +6,32 @@ # 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= ${PORTNAME} + MAN8= pfflowd.8 -PLIST_FILES= sbin/pfflowd \ - etc/rc.d/pfflowd.sh.sample +PLIST_FILES= sbin/pfflowd .include <bsd.port.pre.mk> .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 +if ${OSVERSION} < 700000 +BROKEN= does not compile +.endif pre-build: ${CAT} ${FILESDIR}/pidfile.h > ${WRKSRC}/pidfile.h @@ -39,6 +40,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 <bsd.port.post.mk> diff --git a/net/pfflowd/distinfo b/net/pfflowd/distinfo index dbe6daa31f59..79ba5f188bee 100644 --- a/net/pfflowd/distinfo +++ b/net/pfflowd/distinfo @@ -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 diff --git a/net/pfflowd/files/pfflowd.in b/net/pfflowd/files/pfflowd.in new file mode 100644 index 000000000000..6e9a45d9b34e --- /dev/null +++ b/net/pfflowd/files/pfflowd.in @@ -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="<host>:<port>" +# +# 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" diff --git a/net/pfflowd/files/pfflowd.sh.sample b/net/pfflowd/files/pfflowd.sh.sample deleted file mode 100644 index 65ba59d5c5a4..000000000000 --- a/net/pfflowd/files/pfflowd.sh.sample +++ /dev/null @@ -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 |