Skip to content

Instantly share code, notes, and snippets.

@glaszig
Created August 2, 2016 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glaszig/02cb28c47453906fb64b918c2c9d5189 to your computer and use it in GitHub Desktop.
Save glaszig/02cb28c47453906fb64b918c2c9d5189 to your computer and use it in GitHub Desktop.
munin 2.0.19 if plugin patch
--- if_.orig 2016-08-02 23:52:05.691224811 +0200
+++ if_ 2016-08-02 23:52:49.563223127 +0200
@@ -91,7 +91,7 @@
# iwlist first)
if [[ -r /sys/class/net/$INTERFACE/speed ]]; then
SPEED=$(cat /sys/class/net/$INTERFACE/speed 2>/dev/null)
- if [[ -n "$SPEED" ]]; then
+ if [ -n "$SPEED" -a "$SPEED" -gt "0" ]; then
echo $SPEED
return
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment