From 4d8e5cc509ac3c74cdc25a7a22256c6624ffe3a9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 13 Aug 2009 14:49:52 -0700 Subject: Skip more wireless interfaces Hostapd creates mon.wlanX interfaces which are not something we need to make visible. --- 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 091e49f..6089361 100755 --- a/lib/Vyatta/Misc.pm +++ b/lib/Vyatta/Misc.pm @@ -96,12 +96,13 @@ sub generate_dhclient_intf_files { # get list of interfaces on the system via sysfs # skip dot files (and any interfaces name .xxx) # and bond_masters file used by bonding -# and pseudo-interface wmaster used by wireless (will disappear in 2.6.32) +# and wireless control interfaces sub getInterfaces { opendir( my $sys_class, '/sys/class/net' ) or die "can't open /sys/class/net: $!"; my @interfaces = grep { ( !/^\./ ) && ( $_ ne 'bonding_masters' ) && + ! ( $_ =~ '^mon.wlan\d$') && ! ( $_ =~ '^wmaster\d+$') } readdir $sys_class; closedir $sys_class; -- cgit v1.2.3