summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/network/ethernet.pm22
1 files changed, 10 insertions, 12 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 2659950ef..723daa196 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -85,9 +85,6 @@ sub get_eth_cards_names {
#- fix modules aliases
$modules_conf->remove_alias($card->[1]);
$modules_conf->set_alias($card->[0], $card->[1]);
-
- #- update iftab
- update_eth_card_iftab($card->[0]);
}
{ map { $_->[0] => join(': ', $_->[0], $_->[2]) } @all_cards };
@@ -99,15 +96,16 @@ sub get_eth_card_mac_address {
`LC_ALL= LANG= $::prefix/sbin/ip -o link show $intf 2>/dev/null` =~ m|.*link/(\S+)\s([0-9a-z:]+)\s|;
}
-#- write interface MAC address (if any) in iftab
-sub update_eth_card_iftab {
- my ($intf) = @_;
- my ($link_type, $mac_address) = get_eth_card_mac_address($intf) or next;
- my $descriptor = ${{ ether => 'mac', ieee1394 => 'mac_ieee1394' }}{$link_type} or next;
- substInFile {
- s/^$intf\s+.*\n//;
- $_ .= qq($intf\t$descriptor $mac_address\n) if eof
- } "$::prefix/etc/iftab";
+#- write interfaces MAC address in iftab
+sub update_iftab() {
+ foreach my $intf (detect_devices::getNet()) {
+ my ($link_type, $mac_address) = get_eth_card_mac_address($intf) or next;
+ my $descriptor = ${{ ether => 'mac', ieee1394 => 'mac_ieee1394' }}{$link_type} or next;
+ substInFile {
+ s/^$intf\s+.*\n//;
+ $_ .= qq($intf\t$descriptor $mac_address\n) if eof
+ } "$::prefix/etc/iftab";
+ }
}
# automatic net aliases configuration