[naalstones] muninlite: Fixes: Error messages on server due to missing ethtool on node, recognition of tapX devices, recognition of openwrt bridges, and workaround for dashes in interface names (replace with an underscore on graph)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@26973 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
21
admin/muninlite/patches/100-fix-no-ethtool.patch
Normal file
21
admin/muninlite/patches/100-fix-no-ethtool.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- a/plugins/if_
|
||||
+++ b/plugins/if_
|
||||
@@ -15,10 +15,14 @@ config_if() {
|
||||
echo "up.min 0"
|
||||
echo "up.negative down"
|
||||
echo "up.cdef up,8,*"
|
||||
- if ethtool $1 | grep -q Speed; then
|
||||
- MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000))
|
||||
- echo "up.max $MAX"
|
||||
- echo "down.max $MAX"
|
||||
+ if [ -n "$(which ethtool)" ]; then
|
||||
+ if [ -x "$(which ethtool)" ]; then
|
||||
+ if ethtool $1 | grep -q Speed; then
|
||||
+ MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000))
|
||||
+ echo "up.max $MAX"
|
||||
+ echo "down.max $MAX"
|
||||
+ fi
|
||||
+ fi
|
||||
fi
|
||||
}
|
||||
fetch_if() {
|
Reference in New Issue
Block a user