summaryrefslogtreecommitdiffstats
path: root/lib/network/connection_manager.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network/connection_manager.pm')
-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');