summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-08 07:21:54 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-08 07:21:54 +0000
commitd28fe228e9616d4b1bc8a6a5bef53a423a5151a1 (patch)
tree9f723569d5aeb1fef86070f30655b9209039aecb /perl-install
parent95607c5d088e74f1739c69e26235ef7e91cfeb05 (diff)
downloaddrakx-backup-do-not-use-d28fe228e9616d4b1bc8a6a5bef53a423a5151a1.tar
drakx-backup-do-not-use-d28fe228e9616d4b1bc8a6a5bef53a423a5151a1.tar.gz
drakx-backup-do-not-use-d28fe228e9616d4b1bc8a6a5bef53a423a5151a1.tar.bz2
drakx-backup-do-not-use-d28fe228e9616d4b1bc8a6a5bef53a423a5151a1.tar.xz
drakx-backup-do-not-use-d28fe228e9616d4b1bc8a6a5bef53a423a5151a1.zip
remove update_eth_card_iftab(), add update_iftab()
Diffstat (limited to 'perl-install')
-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