summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index e2f01cf95..3c9107c84 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -830,12 +830,13 @@ sub configureTimezone {
]) or goto &configureTimezone
if $::expert || $clicked;
if ($ntp) {
- my @servers = split("\n", timezone::ntp_servers());
+ my $servers = timezone::ntp_servers();
+ $o->{timezone}{ntp} ||= 'pool.ntp.org';
- $o->ask_from_({},
- [ { label => N("NTP Server"), val => \$o->{timezone}{ntp}, list => \@servers, not_edit => 0 } ]
+ $in->ask_from_({},
+ [ { label => N("NTP Server"), val => \$o->{timezone}{ntp}, list => [ keys %$servers ], not_edit => 0,
+ format => sub { $servers->{$_[0]} ? "$servers->{$_[0]} ($_[0])" : $_[0] } } ]
) or goto &configureTimezone;
- $o->{timezone}{ntp} =~ s/.*\((.+)\)/$1/;
} else {
$o->{timezone}{ntp} = '';
}