Ticket #7507: 0003-add-support-for-br-devices.patch

File 0003-add-support-for-br-devices.patch, 1.3 KB (added by russell.sim@…, 7 years ago)
  • munin-node.in

    From 7ec2437f10d7f99fd09b47c341fec77b8f2841be Mon Sep 17 00:00:00 2001
    From: Russell Sim <russell.sim@gmail.com>
    Date: Sat, 5 Mar 2011 12:14:33 +1100
    Subject: [PATCH 3/3] add support for br devices
    
    ---
     munin-node.in |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/munin-node.in b/munin-node.in
    index c25a928..d5afc8b 100755
    a b RES="" 
    7272for PLUG in $PLUGINS 
    7373do  
    7474  if [ "$PLUG" = "if_" ]; then   
    75     for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g' | tr '-' '_'); 
     75    for INTER in $(grep '^ *\(br\|ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g' | tr '-' '_'); 
    7676    do 
    7777      INTERRES=$(echo $INTER | sed 's/\./VLAN/') 
    7878      RES="$RES if_$INTERRES" 
    do 
    8080      eval "config_if_${INTERRES}() { config_if $INTER $@; };" 
    8181    done 
    8282  elif [ "$PLUG" = "if_err_" ]; then 
    83     for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g' | tr '-' '_'); 
     83    for INTER in $(grep '^ *\(br\|ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g' | tr '-' '_'); 
    8484    do 
    8585      INTERRES=$(echo $INTER | sed 's/\./VLAN/') 
    8686      RES="$RES if_err_$INTERRES"