mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
- bump portrevision because important features were added to port
to make it more functional and userfriendly - added cflowd's startup script to FILESDIR, add startup options to it, that are only valid for the patched cflowd. So later we overwrite the sample startup script of "stock" cflowd. This is done this way, because cflowd also can be used without flowscan. But *if* we use cflowd with flowscan, we have to manage things to work with flowscan. - install sample Makefile to graphs directory, so you can generate graphs more easily as being described in the docu (see INSTALL) - Added comments to pkg-message file, that this Makefile has to be updated whenever you add or remove protocol types in ${PREFIX}/var/db/flows/bin/CampusIO.cf - comment post-install section more.. - keep_me file could be removed, since we install the sample Makefile now in the graphs subdir
This commit is contained in:
parent
980af03d6b
commit
39675045a0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=40353
@ -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>
|
||||
|
37
net-mgmt/flowscan/files/cflowd.sh
Normal file
37
net-mgmt/flowscan/files/cflowd.sh
Normal file
@ -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
|
@ -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 !
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
37
net/flowscan/files/cflowd.sh
Normal file
37
net/flowscan/files/cflowd.sh
Normal file
@ -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
|
@ -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 !
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user