summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-02-05 22:38:28 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-02-05 22:38:28 +0000
commitd622f5b1e9a6c7dcfdf7f695362cc310f2606059 (patch)
tree94977f9ddd822181ba7a4d0395359cb6f0ca0c20 /perl-install/network
parent4b887ab5b1be93b1eae6e683adb57b966572a7c6 (diff)
downloaddrakx-d622f5b1e9a6c7dcfdf7f695362cc310f2606059.tar
drakx-d622f5b1e9a6c7dcfdf7f695362cc310f2606059.tar.gz
drakx-d622f5b1e9a6c7dcfdf7f695362cc310f2606059.tar.bz2
drakx-d622f5b1e9a6c7dcfdf7f695362cc310f2606059.tar.xz
drakx-d622f5b1e9a6c7dcfdf7f695362cc310f2606059.zip
(get_eth_cards) try first to match a pcmcia device before trying to
match pci/usb ones when looking for real device's name (#7401)
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/ethernet.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 1fd52e06d..7f05db43d 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -53,12 +53,16 @@ sub get_eth_cards() {
my $saved_driver;
return map {
my $interface = $_;
+ my $description;
my $a = c::getNetDriver($interface) || modules::get_alias($interface);
- my $b = find { $_->{device} eq $interface } @devs;
- $a ||= $b->{driver};
+ if (my $b = find { $_->{device} eq $interface } @devs) { # PCMCIA case
+ $a = $b->{driver};
+ $description = $b->{description};
+ } else {
+ ($description) = (mapIntfToDevice($interface))[0]->{description};
+ }
$a and $saved_driver = $a; # handle multiple cards managed by the same driver
- my ($device) = mapIntfToDevice($interface);
- [ $interface, $saved_driver, if_($device, $device->{description}) ]
+ [ $interface, $saved_driver, if_($description, $description) ]
} @all_cards;
}
@@ -73,6 +77,7 @@ sub get_eth_cards_names {
{ map { $_->[0] => join(': ', $_->[0], $_->[2]) } @all_cards };
}
+
#- conf_network_card_backend : configure the network cards and return the list of them, or configure one specified interface : WARNING, you have to setup the ethernet cards, by calling load_category($in, 'network/main|gigabit|usb', !$::expert, 1) or load_category_backend before calling this function. Basically, you call this function in 2 times.
#- input
#- $prefix