From 5f7d237822a7d430d7afa58cbb6339642cf3ab76 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 2 Mar 2009 17:05:33 -0800 Subject: Ignore /sys/class/net/bonding_masters Bonding leaves this file in /sys/class/net that confuses scripts. --- lib/Vyatta/Misc.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm index 9140d4c..1565765 100755 --- a/lib/Vyatta/Misc.pm +++ b/lib/Vyatta/Misc.pm @@ -93,7 +93,8 @@ sub generate_dhclient_intf_files { sub getInterfaces { opendir (my $sys_class, '/sys/class/net') or die "can't open /sys/class/net: $!"; - my @interfaces = grep !/^\./, readdir $sys_class; + my @interfaces = + grep { ( !/^\./ ) && ( $_ ne 'bonding_masters' ) } readdir $sys_class; closedir $sys_class; return @interfaces; } -- cgit v1.2.3