summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-19 18:36:33 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-19 18:36:33 +0000
commit50720ff0e76d0ccfdb49089aef64d8c97de52740 (patch)
treec6e7c64664e42965ef553447bdbbccaf8f1c4ced /perl-install/any.pm
parent598c9ddc46a73435743bf5006d11ed434f2ab0d8 (diff)
downloaddrakx-50720ff0e76d0ccfdb49089aef64d8c97de52740.tar
drakx-50720ff0e76d0ccfdb49089aef64d8c97de52740.tar.gz
drakx-50720ff0e76d0ccfdb49089aef64d8c97de52740.tar.bz2
drakx-50720ff0e76d0ccfdb49089aef64d8c97de52740.tar.xz
drakx-50720ff0e76d0ccfdb49089aef64d8c97de52740.zip
allow to hide ntp in advanced settings
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index d58e6ed10..ffa11e00d 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1343,14 +1343,14 @@ sub configure_timezone {
my $selected_timezone = $in->ask_from_treelist(N("Timezone"), N("Which is your timezone?"), '/', [ timezone::getTimeZones() ], $timezone->{timezone}) or return;
$timezone->{timezone} = $selected_timezone;
- configure_time_more($in, $timezone)
+ configure_time_more($in, $timezone, undef)
or goto &configure_timezone if $ask_gmt || to_bool($timezone->{ntp});
1;
}
sub configure_time_more {
- my ($in, $timezone) = @_;
+ my ($in, $timezone, $o_hide_ntp) = @_;
my $ntp = to_bool($timezone->{ntp});
my $servers = timezone::ntp_servers();
@@ -1372,9 +1372,10 @@ sub configure_time_more {
N("%s (hardware clock set to UTC)", POSIX::strftime($time_format, localtime())) :
N("%s (hardware clock set to local time)", POSIX::strftime($time_format, gmtime()));
} },
- { label => N("NTP Server"), title => 1 },
- { text => N("Automatic time synchronization (using NTP)"), val => \$ntp, type => 'bool' },
- { val => \$timezone->{ntp}, disabled => sub { !$ntp },
+ { label => N("NTP Server"), title => 1, advanced => $o_hide_ntp },
+ { text => N("Automatic time synchronization (using NTP)"), val => \$ntp, type => 'bool',
+ advanced => $o_hide_ntp },
+ { val => \$timezone->{ntp}, disabled => sub { !$ntp }, advanced => $o_hide_ntp,
type => "list", separator => '|',
list => [ keys %$servers ], format => sub { $servers->{$_[0]} } },
]) or return;