mirror of
https://github.com/webmin/webmin.git
synced 2025-08-19 01:15:14 +00:00
Fedora 17 ethernet interfaces can be named like em0 https://sourceforge.net/tracker/index.php?func=detail&aid=3574434&group_id=17457&atid=117457#
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user