fprobe init script does not work with filters
Entering a filter in /etc/conf.d/fprobe:
FILTER=“ip”
FILTER=“tcp and port 22”
FILTER=“udp or tcp”
Causes fprobe to fail to start
Solution is to update fprobe /etc/init.d script:
diff --git a/main/fprobe/fprobe.initd b/main/fprobe/fprobe.initd
index a14f1e6..d4fed4e 100644
--- a/main/fprobe/fprobe.initd
+++ b/main/fprobe/fprobe.initd
@@ -15,8 +15,9 @@ PIDFILE="/var/run/fprobe$PIDFILE_EXTRA.pid"
start() {
ebegin "Starting fprobe"
local OPTS=""
+ set --
[ "${PROMISC}" == "yes" ] || OPTS="${OPTS} -p"
- [ -n "${FILTER}" ] && OPTS="${OPTS} -f '${FILTER}'"
+ [ -n "${FILTER}" ] && set -- -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 \
@@ -28,7 +29,7 @@ start() {
OPTS="${OPTS} -l 1:${PIDFILE_ID} ${COLLECTORS}"
start-stop-daemon --start --exec $BIN \
--pidfile ${PIDFILE} \
- -- ${OPTS}
+ -- "$@" ${OPTS}
eend $?
}
(from redmine: issue id 990, created on 2012-02-03, closed on 2012-02-03)
- Changesets:
- Revision 513a0744 by Natanael Copa on 2012-02-03T07:11:59Z:
main/fprobe: fix shell variable expansion bug in init.d script
ref #990
- Revision 9f3a25a2 by Natanael Copa on 2012-02-03T07:13:49Z:
main/fprobe: fix shell variable expansion bug in init.d script
fixes #990