diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-03-24 22:41:41 +0059 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-03-24 22:41:41 +0059 |
commit | 6eaf389403cdbfbf25462f16b1c6e423778b2ba9 (patch) | |
tree | 2c5e48f9d6b2e82a235b26a5051a814869281629 /lib | |
parent | 24ff353349329a6c528835f7edfb7a4978c7bc73 (diff) | |
download | colin-keep-6eaf389403cdbfbf25462f16b1c6e423778b2ba9.tar colin-keep-6eaf389403cdbfbf25462f16b1c6e423778b2ba9.tar.gz colin-keep-6eaf389403cdbfbf25462f16b1c6e423778b2ba9.tar.bz2 colin-keep-6eaf389403cdbfbf25462f16b1c6e423778b2ba9.tar.xz colin-keep-6eaf389403cdbfbf25462f16b1c6e423778b2ba9.zip |
Managed new api for additional systemd-timesyncd
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ManaTools/Module/Clock.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/ManaTools/Module/Clock.pm b/lib/ManaTools/Module/Clock.pm index 7c708a2..56a1e5c 100644 --- a/lib/ManaTools/Module/Clock.pm +++ b/lib/ManaTools/Module/Clock.pm @@ -332,7 +332,7 @@ sub _adminClockPanel { # (1) write new TZ settings # (2) write new NTP settigs if checked # (3) use date time fields if NTP is not checked - +$DB::single = 1; my $old_conf = $self->sh_tz->readConfiguration(); if ($info->{time_zone}->{UTC} != $old_conf->{UTC} || $info->{time_zone}->{ZONE} ne $old_conf->{ZONE}) { @@ -351,9 +351,20 @@ sub _adminClockPanel { if ($ntpFrame->value()) { # (2) if ($info->{ntp_server}) { - eval { $self->sh_tz->setNTPServer($info->{ntp_server}) }; + eval { $self->sh_tz->setNTPConfiguration($info->{ntp_server}) }; my $errors = $@; if ($errors) { + # TODO should finish and not continue for this error + $finished = 0; + $self->sh_gui->warningMsgBox({ + title => $self->loc->N("set NTP Configuration failed"), + text => "$errors", + richtext => 1, + }); + } + eval { $self->sh_tz->enableAndStartNTP($info->{ntp_server}) }; + $errors = $@; + if ($errors) { $finished = 0; $self->sh_gui->warningMsgBox({ title => $self->loc->N("Set NTP failed"), |