diff --git a/plugins/if_ b/plugins/if_ index 11b80c9..dc6b379 100644 --- a/plugins/if_ +++ b/plugins/if_ @@ -16,7 +16,7 @@ config_if() { echo "up.min 0" echo "up.negative down" echo "up.cdef up,8,*" - if [ -n "$(which ethtool)" ] && [ -x "$(which ethtool)" ] && ethtool "$INTERFACE" | grep -q Speed; then + if [ -n "$(which ethtool)" ] && [ -x "$(which ethtool)" ] && ethtool "$INTERFACE" 2>/dev/null | grep -q Speed; then MAX=$(($(ethtool "$INTERFACE" | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d " " -f 2) * 1000000)) echo "up.max $MAX" echo "down.max $MAX"