summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-10-27 16:43:46 +0000
committerOlivier Blin <oblin@mandriva.org>2005-10-27 16:43:46 +0000
commit02f6c1f6cf632a8badfb56e147b9b282bfbc5499 (patch)
treef97fc57769ec52c436418852c2340d78406d3af8
parent3fbb7d8305412340e1d0a67d1e574d1f5bb238e4 (diff)
downloaddrakx-02f6c1f6cf632a8badfb56e147b9b282bfbc5499.tar
drakx-02f6c1f6cf632a8badfb56e147b9b282bfbc5499.tar.gz
drakx-02f6c1f6cf632a8badfb56e147b9b282bfbc5499.tar.bz2
drakx-02f6c1f6cf632a8badfb56e147b9b282bfbc5499.tar.xz
drakx-02f6c1f6cf632a8badfb56e147b9b282bfbc5499.zip
use standard 'mac' modifier in iftab for IEEE1394, EUI64 and IRDA
-rw-r--r--perl-install/network/ethernet.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 572a33ae8..00f0b8e26 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -111,7 +111,7 @@ sub get_eth_cards_names {
#- returns (link_type, mac_address)
sub get_eth_card_mac_address {
my ($intf) = @_;
- #- don't look for 6 bytes addresses only because of firewire
+ #- don't look for 6 bytes addresses only because of various non-standard MAC addresses
`$::prefix/sbin/ip -o link show $intf 2>/dev/null` =~ m|.*link/(\S+)\s((?:[0-9a-f]{2}:?)+)\s|;
}
@@ -122,11 +122,12 @@ sub update_iftab() {
my ($link_type, $mac_address) = get_eth_card_mac_address($intf) or next;
#- do not write zeroed MAC addresses in iftab, it confuses ifrename
$mac_address =~ /^[0:]+$/ and next;
- my $descriptor = ${{ ether => 'mac', ieee1394 => 'mac_ieee1394' }}{$link_type} or next;
+ # ifrename supports alsa IEEE1394, EUI64 and IRDA
+ member($link, 'ether', 'ieee1394', 'irda', '[27]') or next;
substInFile {
s/^$intf\s+.*\n//;
s/^.*\s+$mac_address\n//;
- $_ .= qq($intf\t$descriptor $mac_address\n) if eof;
+ $_ .= qq($intf mac $mac_address\n) if eof;
} "$::prefix/etc/iftab";
}
}