Browse Source

muninlite: revert "correctly parse ifname with - char"

This reverts commit edcad492e1.

Patch is broken and breaking build; reverting until I have time to
investigate.

Reopens #701
Closes #889

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
lilik-openwrt-22.03
Jonathan McCrohan 10 years ago
parent
commit
4f8fea4e22
1 changed files with 0 additions and 20 deletions
  1. +0
    -20
      admin/muninlite/patches/220-modify-ifname-parser.patch

+ 0
- 20
admin/muninlite/patches/220-modify-ifname-parser.patch View File

@ -1,20 +0,0 @@
--- a/munin-node.in
+++ b/munin-node.in
@@ -141,7 +141,7 @@
fi
}
fetch_if() {
- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
+ IINFO=$(sed -ne "/^ *${1//_/-}: / { s/^.\+: \+//; s/[[:space:]]\+/ /gp }" /proc/net/dev)
echo "down.value" $(echo $IINFO | cut -d\ -f1)
echo "up.value" $(echo $IINFO | cut -d\ -f9)
}
@@ -162,7 +162,7 @@
echo "trans.warning 1"
}
fetch_if_err() {
- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
+ IINFO=$(sed -ne "/^ *${1//_/-}: / { s/^.\+: \+//; s/[[:space:]]\+/ /gp }" /proc/net/dev)
echo "rcvd.value" $(echo $IINFO | cut -d\ -f3)
echo "trans.value" $(echo $IINFO | cut -d\ -f11)
}

Loading…
Cancel
Save