From d622f5b1e9a6c7dcfdf7f695362cc310f2606059 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 5 Feb 2004 22:38:28 +0000 Subject: (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) --- perl-install/network/ethernet.pm | 13 +++++++++---- 1 file 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 -- cgit v1.2.1