From c7801904b0dbb2017d1d88cebc3060f75d7a2f10 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 30 Jul 2003 15:11:26 +0000 Subject: - cleanup - add pool.ntp.org (and make it the default) (cf bug #4197) --- perl-install/install_steps_interactive.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'perl-install/install_steps_interactive.pm') 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} = ''; } -- cgit v1.2.1