summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-11-07 17:06:47 +0000
committerOlivier Blin <oblin@mandriva.org>2005-11-07 17:06:47 +0000
commitbae38ba3c1d5e06fe68f06b7de3a75c15291af5c (patch)
tree483396374a98a5bbd7a175182ad1d163432c209a
parent41721cfd48dd2ae8598796c46e8b28966c2f8f0b (diff)
downloaddrakx-bae38ba3c1d5e06fe68f06b7de3a75c15291af5c.tar
drakx-bae38ba3c1d5e06fe68f06b7de3a75c15291af5c.tar.gz
drakx-bae38ba3c1d5e06fe68f06b7de3a75c15291af5c.tar.bz2
drakx-bae38ba3c1d5e06fe68f06b7de3a75c15291af5c.tar.xz
drakx-bae38ba3c1d5e06fe68f06b7de3a75c15291af5c.zip
don't let interfaces with unknown drivers be configured
-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;