summaryrefslogtreecommitdiffstats
path: root/perl-install/network/netconnect.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-10-27 17:04:32 +0000
committerOlivier Blin <oblin@mandriva.org>2005-10-27 17:04:32 +0000
commit667ad7796e9d687084a8536cea46ecb065265fc4 (patch)
tree41befabdaa37eafe6aca73255fe951e072948d8c /perl-install/network/netconnect.pm
parent02f6c1f6cf632a8badfb56e147b9b282bfbc5499 (diff)
downloaddrakx-667ad7796e9d687084a8536cea46ecb065265fc4.tar
drakx-667ad7796e9d687084a8536cea46ecb065265fc4.tar.gz
drakx-667ad7796e9d687084a8536cea46ecb065265fc4.tar.bz2
drakx-667ad7796e9d687084a8536cea46ecb065265fc4.tar.xz
drakx-667ad7796e9d687084a8536cea46ecb065265fc4.zip
don't let interfaces with unknown drivers be configured
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r--perl-install/network/netconnect.pm7
1 files changed, 6 insertions, 1 deletions
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;