#LOCALIP=
# SNMP iface id
-SNMP_IFACE="${IFACE//eth}"
+SNMP_IFACE="${IFACE#eth}"
# Maximum number of concurrent flows to track
# using a specified amount of memory
#!/sbin/openrc-run
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
start() {
ebegin "Starting fprobe"
local OPTS=""
- [ "${PROMISC}" == "yes" ] || OPTS="${OPTS} -p"
+ [ "${PROMISC}" = "yes" ] || OPTS="${OPTS} -p"
[ -n "${FILTER}" ] && OPTS="${OPTS} -f '${FILTER}'"
for optname in i:IFACE s:TIMER_EXPIRED g:TIME_FRAGMENTED d:TIMER_IDLE \
e:TIMER_ACTIVE n:FLOW_VER a:LOCALIP x:SNMP_IFACE b:MEMBULK \
m:MEMLIMIT q:PENDING B:KERNBUF r:RTPRIO t:DELAY S:SNAPLEN \
c:CHROOT u:USER v:LOGLEVEL ; do
- opt="${optname/:*}" optvar="${optname/*:}"
- optvalue="${!optvar}"
+ opt="${optname%:*}" optvar="${optname#*:}"
+ eval optvalue='$'$optvar
[ -n "$optvalue" ] && OPTS="${OPTS} -${opt} ${optvalue}"
done
OPTS="${OPTS} -l 1:${PIDFILE_ID} ${COLLECTORS}"
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
-inherit eutils
+EAPI=6
-DESCRIPTION="A libpcap-based tool to collect network traffic data and emit it as NetFlow flows"
+DESCRIPTION="libpcap-based tool to collect network traffic data and emit it as NetFlow flows"
HOMEPAGE="http://fprobe.sourceforge.net"
LICENSE="GPL-2"
IUSE="debug messages"
-DEPEND="net-libs/libpcap"
-
-src_prepare() {
- # The pidfile should be created by the parent process, before the
- # setuid/chroot is executed.
- epatch "${FILESDIR}"/fprobe-1.1-pidfile-sanity.patch
- # This seems to fail, uncertain why.
- epatch "${FILESDIR}"/fprobe-1.1-setgroups.patch
-}
+DEPEND="
+ net-libs/libpcap
+"
+RDEPEND="
+ ${DEPEND}
+"
+PATCHES=(
+ "${FILESDIR}"/fprobe-1.1-pidfile-sanity.patch
+ "${FILESDIR}"/fprobe-1.1-setgroups.patch
+)
src_configure() {
econf \