Ticket #7507: 0002-send-stderr-to-dev-null.patch

File 0002-send-stderr-to-dev-null.patch, 764 bytes (added by russell.sim@…, 7 years ago)
  • plugins/if_

    From c1cbc28ff054f79ead29b1e742133e0d3473028b Mon Sep 17 00:00:00 2001
    From: Russell Sim <russell.sim@gmail.com>
    Date: Sat, 5 Mar 2011 12:04:17 +1100
    Subject: [PATCH 2/3] send stderr to dev null
    
    ---
     plugins/if_ |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/plugins/if_ b/plugins/if_
    index 03a2ef7..b0f5c7f 100644
    a b config_if() { 
    1616  echo "up.min 0" 
    1717  echo "up.negative down" 
    1818  echo "up.cdef up,8,*" 
    19   if ethtool $if | grep -q Speed; then 
     19  if ethtool $if 2>/dev/null | grep -q Speed; then 
    2020    MAX=$(($(ethtool $if | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\  -f2) * 1000000)) 
    2121    echo "up.max $MAX" 
    2222    echo "down.max $MAX"