diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-02 17:05:33 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-02 17:05:33 -0800 |
commit | 5f7d237822a7d430d7afa58cbb6339642cf3ab76 (patch) | |
tree | d09b0f0d8309ba9f8722a51d45e8f358a2c8cc4e /lib/Vyatta | |
parent | 2840eb48231ca4fccfa49436002f968c0ef0e3c8 (diff) | |
download | vyatta-cfg-5f7d237822a7d430d7afa58cbb6339642cf3ab76.tar.gz vyatta-cfg-5f7d237822a7d430d7afa58cbb6339642cf3ab76.zip |
Ignore /sys/class/net/bonding_masters
Bonding leaves this file in /sys/class/net that confuses scripts.
Diffstat (limited to 'lib/Vyatta')
-rwxr-xr-x | lib/Vyatta/Misc.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |