summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-10-05 14:08:17 +0000
committerOlivier Blin <oblin@mandriva.com>2007-10-05 14:08:17 +0000
commita8501294dbd2ccaba323bfa6cc09e38ecdd1c677 (patch)
tree04c8a7e997ff19297c5fd55756cda416a1bb8a17 /lib
parent4fc086f0344fc736863f64cfa2c68f3e3b5c673b (diff)
downloaddrakx-net-a8501294dbd2ccaba323bfa6cc09e38ecdd1c677.tar
drakx-net-a8501294dbd2ccaba323bfa6cc09e38ecdd1c677.tar.gz
drakx-net-a8501294dbd2ccaba323bfa6cc09e38ecdd1c677.tar.bz2
drakx-net-a8501294dbd2ccaba323bfa6cc09e38ecdd1c677.tar.xz
drakx-net-a8501294dbd2ccaba323bfa6cc09e38ecdd1c677.zip
check network access and adress settings
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection_manager.pm24
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm
index 113eaa9..d4ae224 100644
--- a/lib/network/connection_manager.pm
+++ b/lib/network/connection_manager.pm
@@ -81,12 +81,15 @@ sub configure_connection {
load_settings($cmanager);
- $cmanager->{in}->ask_from_({
- title => N("Network settings"),
- messages => N("Please enter settings for network"),
- icon => $cmanager->{connection}->get_type_icon(48),
- banner_title => $cmanager->{connection}->get_description,
- },
+ my $error;
+ do {
+ undef $error;
+ $cmanager->{in}->ask_from_({
+ title => N("Network settings"),
+ messages => N("Please enter settings for network"),
+ icon => $cmanager->{connection}->get_type_icon(48),
+ banner_title => $cmanager->{connection}->get_description,
+ },
[
$cmanager->{connection}->can('get_network_access_settings') ? (
{ label => $cmanager->{connection}->get_network_access_settings_label, title => 1, advanced => 1 },
@@ -108,6 +111,15 @@ sub configure_connection {
) : (),
],
) or return;
+ if ($cmanager->{connection}->can('check_network_access_settings') && !$cmanager->{connection}->check_network_access_settings) {
+ $cmanager->{in}->ask_warn(N("Error"), $cmanager->{connection}->{network_access}{error}{message});
+ $error = 1;
+ }
+ if ($cmanager->{connection}->can('check_address_settings') && !$cmanager->{connection}->check_address_settings($cmanager->{net})) {
+ $cmanager->{in}->ask_warn(N("Error"), $cmanager->{connection}->{address}{error}{message});
+ $error = 1;
+ }
+ } while $error;
$cmanager->{connection}->install_packages($cmanager->{in}) if $cmanager->{connection}->can('install_packages');
$cmanager->{connection}->unload_connection if $cmanager->{connection}->can('unload_connection');