aboutsummaryrefslogtreecommitdiff
path: root/net/flowscan
diff options
context:
space:
mode:
authorAndreas Klemm <andreas@FreeBSD.org>2001-03-25 15:54:48 +0000
committerAndreas Klemm <andreas@FreeBSD.org>2001-03-25 15:54:48 +0000
commit39675045a03d067b2bb578aa844f758297e41374 (patch)
tree75ada575a4d077c06aaa2c4eff8cd594874a0b91 /net/flowscan
parent980af03d6b89b4d9f5340eaf5690c3a26650bcd7 (diff)
downloadports-39675045a03d067b2bb578aa844f758297e41374.tar.gz
ports-39675045a03d067b2bb578aa844f758297e41374.zip
Notes
Diffstat (limited to 'net/flowscan')
-rw-r--r--net/flowscan/Makefile17
-rw-r--r--net/flowscan/files/cflowd.sh37
-rw-r--r--net/flowscan/pkg-message5
-rw-r--r--net/flowscan/pkg-plist3
4 files changed, 57 insertions, 5 deletions
diff --git a/net/flowscan/Makefile b/net/flowscan/Makefile
index ed3c83927f37..31af328cd2a8 100644
--- a/net/flowscan/Makefile
+++ b/net/flowscan/Makefile
@@ -7,7 +7,7 @@
PORTNAME= flowscan
PORTVERSION= 1.006
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net
MASTER_SITES= http://net.doit.wisc.edu/~plonka/FlowScan/
DISTFILES= FlowScan-${PORTVERSION}.tar.gz
@@ -30,16 +30,25 @@ WRKSRC= ${WRKDIR}/FlowScan-${PORTVERSION}
pre-install:
@ ${MKDIR} -p ${PREFIX}/var/db/flows/bin
@ ${MKDIR} -p ${PREFIX}/var/db/flows/graphs
- @ ${TOUCH} ${PREFIX}/var/db/flows/graphs/.keep_me
post-install:
+ # install sample startup script
@ ${INSTALL_SCRIPT} ${FILESDIR}/flowscan.sh \
- /usr/local/etc/rc.d/cflowd-flowscan.sh.sample
+ ${PREFIX}/etc/rc.d/cflowd-flowscan.sh.sample
+ # overwrite cflowd startup script, since we need some additional
+ # parameters !
+ @ ${INSTALL_SCRIPT} ${FILESDIR}/cflowd.sh \
+ ${PREFIX}/etc/rc.d/cflowd-base.sh.sample
+ # install sample Makefile to generate graphs
+ @ ${INSTALL_DATA} ${WRKSRC}/graphs.mf \
+ ${PREFIX}/var/db/flows/graphs/Makefile.sample
+ # install sample config files
.for i in CampusIO.cf Napster_subnets.boulder SubNetIO.cf flowscan.cf \
local_nets.boulder our_subnets.boulder
@ ${INSTALL_DATA} ${WRKSRC}/cf/${i} \
${PREFIX}/var/db/flows/bin/${i}.sample
.endfor
+ # install important docu files
@ ${MKDIR} -p ${PREFIX}/share/doc/flowscan
@ ${INSTALL_DATA} ${WRKSRC}/example/crontab \
${PREFIX}/share/doc/flowscan/crontab.sample
@@ -48,12 +57,14 @@ post-install:
@ ${INSTALL_DATA} ${WRKSRC}/rc/linux/flowscan \
${PREFIX}/share/doc/flowscan/flowscan.sample
@ ${INSTALL_DATA} ${WRKSRC}/INSTALL ${PREFIX}/share/doc/flowscan
+ # install less important docu files
.if !defined(NOPORTDOCS)
@ ${ECHO_MSG} "===> Installing documentation for ${PKGNAME}"
.for i in README README.html INSTALL.html TODO
@ ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/flowscan
.endfor
.endif
+ # installation info
@ cat ${.CURDIR}/pkg-message
.include <bsd.port.mk>
diff --git a/net/flowscan/files/cflowd.sh b/net/flowscan/files/cflowd.sh
new file mode 100644
index 000000000000..ae9b46a6fa54
--- /dev/null
+++ b/net/flowscan/files/cflowd.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+
+# rc script for cflowd
+# modified to use proper commandline options for flowscan
+# Andreas Klemm <andreas@FreeBSD.org>, So 25 Mär 2001 12:46:10 CEST
+# $FreeBSD$
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+'start')
+ [ -x $PREFIX/sbin/cflowdmux -a -s $PREFIX/etc/cflowd.conf ] \
+ && $PREFIX/sbin/cflowdmux $PREFIX/etc/cflowd.conf \
+ && echo -n " cflowdmux"
+ sleep 2
+ [ -x $PREFIX/sbin/cflowd -a -s $PREFIX/etc/cflowd.conf ] \
+ && $PREFIX/sbin/cflowd -s 300 -O 0 -m $PREFIX/etc/cflowd.conf \
+ && echo -n " cflowd"
+ sleep 2
+ [ -x $PREFIX/sbin/cfdcollect -a -s $PREFIX/etc/cfdcollect.conf ] \
+ && $PREFIX/sbin/cfdcollect $PREFIX/etc/cfdcollect.conf \
+ && echo -n " cfdcollect"
+ ;;
+
+'stop')
+ for i in cfdcollect cflowd cflowdmux
+ do
+ sleep 2
+ killall -15 $i && echo "graceful shutdown of $i"
+ done
+ ;;
+esac
+
+exit 0
diff --git a/net/flowscan/pkg-message b/net/flowscan/pkg-message
index bceddd3f5170..9c15f2bd8991 100644
--- a/net/flowscan/pkg-message
+++ b/net/flowscan/pkg-message
@@ -25,6 +25,9 @@ b) Configure flowscan, see above mentioned docu !
"foo".sample ...
c) Customize and install crontab file, example see:
${PREFIX}/share/doc/flowscan/crontab.sample
-
d) Activate flowscan startscript by renaming it as usual, see example in:
${PREFIX}/etc/rc.d/flowscan.sh.sample
+e) Create graphs using make by customizing the sample Makefile, see docu !
+ ${PREFIX}/var/db/flows/graphs/Makefile.sample
+ Please note, that the Makefile has to be reconfigured if you add
+ or remove protocols in ${PREFIX}/var/db/flows/bin/CampusIO.cf !
diff --git a/net/flowscan/pkg-plist b/net/flowscan/pkg-plist
index 73505a3c85a2..15d672abbdf8 100644
--- a/net/flowscan/pkg-plist
+++ b/net/flowscan/pkg-plist
@@ -1,3 +1,4 @@
+etc/rc.d/cflowd-base.sh.sample
etc/rc.d/cflowd-flowscan.sh.sample
var/db/flows/bin/flowscan
var/db/flows/bin/FlowScan.pm
@@ -14,7 +15,7 @@ var/db/flows/bin/SubNetIO.cf.sample
var/db/flows/bin/flowscan.cf.sample
var/db/flows/bin/local_nets.boulder.sample
var/db/flows/bin/our_subnets.boulder.sample
-var/db/flows/graphs/.keep_me
+var/db/flows/graphs/Makefile.sample
share/doc/flowscan/README
share/doc/flowscan/README.html
share/doc/flowscan/INSTALL