Navigation Menu

Skip to content

Commit

Permalink
linux/if_err: suggest interfaces not ending in a digit
Browse files Browse the repository at this point in the history
See Ticket #943 and r4690 for the same change in if_.
  • Loading branch information
kenyon committed Mar 25, 2012
1 parent 754abf2 commit e311931
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugins/node.d.linux/if_err_.in
Expand Up @@ -61,11 +61,7 @@ fi

if [ "$1" = "suggest" ]; then
if [ -r /proc/net/dev ]; then
awk '
/^ *(eth|tap|bond|wlan|ath|ra|sw|vlan|venet|veth|msh)[0-9]+(\.[0-9]+)?:/ {
split($0, a, /: */);
gsub(/^ +/,"",a[1]);
if (($2 > 0) || ($10 > 0)) print a[1]; }' /proc/net/dev
sed -rne '/^[[:space:]]*(lo|sit[[:digit:]]+):/d;s,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev
fi
exit 0
fi
Expand Down

0 comments on commit e311931

Please sign in to comment.