diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-10-05 13:58:34 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-10-05 13:58:34 +0000 |
commit | 4fc086f0344fc736863f64cfa2c68f3e3b5c673b (patch) | |
tree | 5cfddc39a0ea32c63ad62c96351319d1a08322c4 | |
parent | 0708340cb563637ca61e53ab349bd63adc9b7c46 (diff) | |
download | drakx-net-4fc086f0344fc736863f64cfa2c68f3e3b5c673b.tar drakx-net-4fc086f0344fc736863f64cfa2c68f3e3b5c673b.tar.gz drakx-net-4fc086f0344fc736863f64cfa2c68f3e3b5c673b.tar.bz2 drakx-net-4fc086f0344fc736863f64cfa2c68f3e3b5c673b.tar.xz drakx-net-4fc086f0344fc736863f64cfa2c68f3e3b5c673b.zip |
drakconnect: check that network access settings are valid (i.e. check wireless key)
-rw-r--r-- | lib/network/netconnect.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm index ee47c56..097bc77 100644 --- a/lib/network/netconnect.pm +++ b/lib/network/netconnect.pm @@ -230,6 +230,14 @@ sub real_main { }, name => sub { $net->{type}->get_type_name . "\n\n" . $connection->get_network_access_settings_label }, data => sub { $network_access_settings }, + complete => sub { + if ($connection->can('check_network_access_settings') && !$connection->check_network_access_settings) { + $in->ask_warn(N("Error"), $connection->{network_access}{error}{message}); + my $index = eval { find_index { $_->{val} eq $connection->{network_access}{error}{field} } @$network_access_settings }; + return 1, $index; + } + return 0; + }, post => sub { $get_next->("configure_network_access") }, }, |