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

@ -1048,7 +1048,7 @@ return $gconfig{'os_type'} eq 'debian-linux' && &has_command("vconfig");
sub boot_iface_hardware
{
return $_[0] =~ /^eth/;
return $_[0] =~ /^(eth|em)/;
}
# supports_address6([&iface])

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()

View File

@ -277,7 +277,8 @@ $conf{'NAME'} = $_[0]->{'desc'};
# If this is a bridge, set BRIDGE in real interface
if ($_[0]->{'bridge'}) {
foreach my $efile (glob("$net_scripts_dir/ifcfg-eth*")) {
foreach my $efile (glob("$net_scripts_dir/ifcfg-eth*"),
glob("$net_scripts_dir/ifcfg-em*")) {
local %bconf;
&lock_file($efile);
&read_env_file($efile, \%bconf);
@ -957,7 +958,7 @@ sub get_dhcp_hostname
return -1 if ($gconfig{'os_type'} ne 'redhat-linux' ||
$gconfig{'os_version'} < 11);
local @boot = &boot_interfaces();
local ($eth) = grep { $_->{'fullname'} =~ /^eth\d+$/ } @boot;
local ($eth) = grep { $_->{'fullname'} =~ /^(eth|em)\d+$/ } @boot;
return -1 if (!$eth);
local %eth;
&read_env_file($eth->{'file'}, \%eth);
@ -991,7 +992,7 @@ return $return;
sub boot_iface_hardware
{
return $_[0] =~ /^eth/;
return $_[0] =~ /^(eth|em)/;
}
# supports_address6([&iface])