From 667ad7796e9d687084a8536cea46ecb065265fc4 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 27 Oct 2005 17:04:32 +0000 Subject: don't let interfaces with unknown drivers be configured --- perl-install/network/netconnect.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 6f2f79f8b..214d91abe 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -95,7 +95,7 @@ sub real_main { detect($modules_conf, $net->{autodetect}, 'lan'); @all_cards = network::ethernet::get_eth_cards($modules_conf); %all_eth_intf = network::ethernet::get_eth_cards_names(@all_cards); #- needed not to loose GATEWAYDEV - %eth_intf = map { $_->[0] => join(': ', $_->[0], $_->[2]) } + %eth_intf = map { $_->[0] => join(': ', $_->[0], $_->[2] || N("Unknown driver")) } grep { to_bool($is_wireless) == detect_devices::is_wireless_interface($_->[0]) } @all_cards; my %available; $available{$_->[2]} = undef foreach grep { $_->[2] } @all_cards; @@ -829,6 +829,11 @@ If you do not know it, keep the preselected type."), translate($eth_intf{$_[0]} || $unavailable_wireless_intf{$_[0]} || $_[0]) } } ]; }, complete => sub { + if (any { $_->[0] eq $ntf_name && !$_->[1] } @all_cards) { + $in->ask_warn(N("Error"), N("Unknown driver")); + return 1; + } + if ($ntf_name eq "Use a Windows driver (with ndiswrapper)") { require network::ndiswrapper; $in->do_pkgs->ensure_is_installed('ndiswrapper', '/usr/sbin/ndiswrapper') or return 1; -- cgit v1.2.1