This commit is contained in:
Jamie Cameron
2012-10-08 14:29:37 -07:00
parent ae7755bee9
commit d5262ce400
3 changed files with 9 additions and 8 deletions

View File

@ -46,7 +46,7 @@ foreach $l (@lines) {
$ifc{'index'} = scalar(@rv);
# Get current status for ethtool
if ($ifc{'fullname'} =~ /^eth(\d+)$/ && $ethtool) {
if ($ifc{'fullname'} =~ /^(eth|em)(\d+)$/ && $ethtool) {
my $out = &backquote_command(
"$ethtool $ifc{'fullname'} 2>/dev/null");
if ($out =~ /Speed:\s+(\S+)/i) {
@ -199,7 +199,7 @@ return ($gconfig{'os_type'} eq 'debian-linux' &&
$gconfig{'os_version'} >= 5 ||
$gconfig{'os_type'} eq 'redhat-linux' &&
$gconfig{'os_version'} >= 13) &&
($iface->{'name'} !~ /^(eth|lo)/ ||
($iface->{'name'} !~ /^(eth|em|lo)/ ||
$iface->{'name'} =~ /^(\S+)\.(\d+)/) &&
$iface->{'virtual'} eq '';
}
@ -214,7 +214,7 @@ if ($_[0] =~ /^(.*)\.(\d+)$/) {
return "PPP" if ($_[0] =~ /^ppp/);
return "SLIP" if ($_[0] =~ /^sl/);
return "PLIP" if ($_[0] =~ /^plip/);
return "Ethernet" if ($_[0] =~ /^eth/);
return "Ethernet" if ($_[0] =~ /^eth|em/);
return "Wireless Ethernet" if ($_[0] =~ /^(wlan|ath)/);
return "Arcnet" if ($_[0] =~ /^arc/);
return "Token Ring" if ($_[0] =~ /^tr/);
@ -380,7 +380,7 @@ return $? ? $out : undef;
# Does some interface have an editable hardware address
sub iface_hardware
{
return $_[0] =~ /^eth/;
return $_[0] =~ /^(eth|em)/;
}
# allow_interface_clash()