summaryrefslogtreecommitdiff
path: root/package/wprobe/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-07 12:50:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-10-07 12:50:15 +0000
commitfafaa38ae55cab486f2b929a131fe433ce180224 (patch)
tree25d7e19e357623b44714e2052228a7e05eb3ade7 /package/wprobe/files
parent6f752c725a5b592dff8c17f0fe4e905de22b8112 (diff)
downloadmtk-20170518-fafaa38ae55cab486f2b929a131fe433ce180224.zip
mtk-20170518-fafaa38ae55cab486f2b929a131fe433ce180224.tar.gz
mtk-20170518-fafaa38ae55cab486f2b929a131fe433ce180224.tar.bz2
move a few unmaintained packages from trunk to /packages
SVN-Revision: 33634
Diffstat (limited to 'package/wprobe/files')
-rw-r--r--package/wprobe/files/wprobe.config10
-rwxr-xr-xpackage/wprobe/files/wprobe.init72
2 files changed, 0 insertions, 82 deletions
diff --git a/package/wprobe/files/wprobe.config b/package/wprobe/files/wprobe.config
deleted file mode 100644
index 63518ef..0000000
--- a/package/wprobe/files/wprobe.config
+++ /dev/null
@@ -1,10 +0,0 @@
-config export
- # uncomment this line to enable ipfix export:
- # option type ipfix
- option ifname ath0
- option host ipfix-col
- option proto tcp
-
-# enable public wprobe protocol access
-config export
- option type wprobe
diff --git a/package/wprobe/files/wprobe.init b/package/wprobe/files/wprobe.init
deleted file mode 100755
index b35246d..0000000
--- a/package/wprobe/files/wprobe.init
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=90
-EXPORTER=/sbin/wprobe-export
-UTIL=/sbin/wprobe-util
-
-wprobe_ssd() {
- local cmd="$1"; shift
- local type="$1"; shift
- local app="$1"; shift
- start-stop-daemon "$cmd" -p "/var/run/wprobe-$type.pid" -b ${app:+-x "$app"} -m -- "$@"
-}
-
-stop_wprobe() {
- local type="$1"
- [ -f "/var/run/wprobe-$type.pid" ] && wprobe_ssd -K "$type"
- rm -f "/var/run/wprobe-$type.pid"
-}
-
-config_wprobe() {
- config_get ifname "$cfg" ifname
- config_get interval "$cfg" interval
- [ -n "$interval" ] || interval=100
- $UTIL "$ifname" -i "$interval" 2>/dev/null >/dev/null
-}
-
-start_proxy() {
- config_get port "$cfg" port
- wprobe_ssd -S proxy "$UTIL" -P -p "${port:-17990}"
-}
-
-start_ipfix() {
- local cfg="$1"
- config_get ifname "$cfg" ifname
- config_get host "$cfg" host
- config_get port "$cfg" port
- config_get proto "$cfg" proto
- case "$proto" in
- sctp) proto="-s";;
- tcp) proto="-t";;
- udp) proto="-u";;
- *) proto="-t";;
- esac
- [ -z "$ifname" -o -z "$host" ] && {
- echo "wprobe-export: missing host or interface name in config $cfg"
- return
- }
- config_wprobe "$cfg"
- wprobe_ssd -S "export-$cfg" "$EXPORTER" "$proto" -i "$ifname" -c "$host" -p "${port:-4739}"
-}
-
-start_export() {
- local cfg="$1"
- config_get export_type "$cfg" type
- case "$export_type" in
- ipfix) [ -x "$EXPORTER" ] && start_ipfix "$cfg";;
- wprobe) start_proxy "$cfg";;
- esac
-}
-
-stop() {
- for f in /var/run/wprobe-*.pid; do
- CFG="${f%%.pid}"
- CFG="${CFG##/var/run/wprobe-}"
- stop_wprobe "$CFG"
- done
-}
-
-start() {
- config_load wprobe
- config_foreach config_wprobe interface
- config_foreach start_export export
-}