Closes 2078765

git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@19 35caa317-6b62-4e8a-81c0-b04f0c356266
This commit is contained in:
runesk 2009-03-17 12:17:51 +00:00
parent 18304c2a4d
commit a18de9ac24

View file

@ -15,7 +15,7 @@ config_if() {
echo "up.min 0" echo "up.min 0"
echo "up.negative down" echo "up.negative down"
echo "up.cdef up,8,*" echo "up.cdef up,8,*"
if ethtool $1 >/dev/null 2>&1; 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)) 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 "up.max $MAX"
echo "down.max $MAX" echo "down.max $MAX"