an easy and consistent way of installing software ported to FreeBSD
#!/bin/sh
#
# $FreeBSD: ports/net-mgmt/flowd/pkg-deinstall,v 1.1 2005/01/26 05:13:28 kevlo Exp $
#
FLOWD_USER=${FLOWD_USER:=_flowd}
delete_user() {
if pw usershow ${FLOWD_USER} 2>/dev/null 1>&2; then
echo "To delete flowd privilege separation user permanently, use 'pw userdel ${FLOWD_USER}'"
fi
}
case $2 in
POST-DEINSTALL)
delete_user
;;
esac
flowd is a small, fast and secure NetFlow collector. It offers the following
features:
* Understands NetFlow protocol v.1, v.5, v.7 and v.9 (including IPv6 flows)
* Supports both IPv4 and IPv6 transport of flows
* Secure: flowd is privilege separated to limit the impact of any compromise
* Supports filtering and tagging of flows, using a packet filter-like syntax
* Stores recorded flow data in a compact binary format which supports
run-time choice over which flow fields are stored
* Ships with both Perl and Python interfaces for reading and parsing the
on-disk record format
* Is licensed under a liberal BSD-like license
WWW: http://www.mindrot.org/flowd.html
#!/bin/sh
#
# $FreeBSD: ports/net-mgmt/flowd/pkg-install,v 1.2 2005/06/04 00:43:20 pav Exp $
#
# Based on cyrus-sasl2 port
#
# create 'flowd' user
#
create_user() {
USER=${FLOWD_USER}
GROUP=nobody
PW=/usr/sbin/pw
if [ -x /usr/sbin/nologin ]; then
shell=/usr/sbin/nologin
elif [ -x /sbin/nologin ]; then
shell=/sbin/nologin
else
shell=/nonexistent
fi
uhome="/var/empty"
if ! ${PW} show user ${USER} -q >/dev/null; then
if ! ${PW} add user ${USER} -g ${GROUP} -d "${uhome}" \
-c "flowd privilege separation user" -s "${shell}" -p "*" \
; then
e=$?
echo "*** Failed to add user \`${USER}'. Please add it manually."
exit ${e}
fi
echo "*** Added user \`${USER}' (id ${uid})"
else
echo "*** You already have user \`${USER}'."
fi
}
case $2 in
POST-INSTALL)
create_user
;;
esac
bin/flowd-reader
etc/flowd.conf.sample
lib/libflowd.a
include/flowd/addr.h
include/flowd/crc32.h
include/flowd/store.h
include/flowd/store-v2.h
include/flowd/flowd-pytypes.h
include/flowd/flowd-config.h
include/flowd/flowd-common.h
sbin/flowd
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/Flowd.so
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/Flowd.bs
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd/.packlist
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Flowd.pm
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Flowd
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto
%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/flowd.so
@dirrm include/flowd