muninlite: fix getting bridge data
This patch fix a bug while getting data for interfaces like br-lan, pppoa-wan. [florian: bump PKG_RELEASE to 4] Signed-off-by: Luca Dariz <luca.dariz@gmail.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/packages@35657 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f4fba8380b
commit
de79b12ca9
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=muninlite
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
|
||||
|
@ -1,22 +1,24 @@
|
||||
--- a/munin-node.in
|
||||
+++ b/munin-node.in
|
||||
@@ -72,7 +72,8 @@ RES=""
|
||||
@@ -72,17 +72,17 @@ RES=""
|
||||
for PLUG in $PLUGINS
|
||||
do
|
||||
if [ "$PLUG" = "if_" ]; then
|
||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g
|
||||
+s/\-/_/g');
|
||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
do
|
||||
INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
||||
- INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
||||
+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
|
||||
RES="$RES if_$INTERRES"
|
||||
@@ -80,7 +81,8 @@ do
|
||||
eval "fetch_if_${INTERRES}() { fetch_if $INTER $@; };"
|
||||
eval "config_if_${INTERRES}() { config_if $INTER $@; };"
|
||||
done
|
||||
elif [ "$PLUG" = "if_err_" ]; then
|
||||
- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g
|
||||
+s/\-/_/g');
|
||||
+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
|
||||
do
|
||||
INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
||||
- INTERRES=$(echo $INTER | sed 's/\./VLAN/')
|
||||
+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
|
||||
RES="$RES if_err_$INTERRES"
|
||||
eval "fetch_if_err_${INTERRES}() { fetch_if_err $INTER $@; };"
|
||||
eval "config_if_err_${INTERRES}() { config_if_err $INTER $@; };"
|
||||
|
Loading…
x
Reference in New Issue
Block a user