diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-03-25 17:16:13 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-03-25 17:16:13 +0100 |
commit | c6df701de37d5d9345f77bc048b8f31901187b67 (patch) | |
tree | f34622574e4c0e6f4aa1932bb9869a40a21c0169 /lib/ManaTools/Shared | |
parent | 4410e51e4ed7d76da5e5d4f84d49b8f56c27fb61 (diff) | |
download | colin-keep-c6df701de37d5d9345f77bc048b8f31901187b67.tar colin-keep-c6df701de37d5d9345f77bc048b8f31901187b67.tar.gz colin-keep-c6df701de37d5d9345f77bc048b8f31901187b67.tar.bz2 colin-keep-c6df701de37d5d9345f77bc048b8f31901187b67.tar.xz colin-keep-c6df701de37d5d9345f77bc048b8f31901187b67.zip |
used include_static_services to get also systemd-timesyncd status
Diffstat (limited to 'lib/ManaTools/Shared')
-rw-r--r-- | lib/ManaTools/Shared/TimeZone.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ManaTools/Shared/TimeZone.pm b/lib/ManaTools/Shared/TimeZone.pm index 121a123..98ebd2a 100644 --- a/lib/ManaTools/Shared/TimeZone.pm +++ b/lib/ManaTools/Shared/TimeZone.pm @@ -167,9 +167,11 @@ sub _ntp_program_init { my $list = $self->ntpServiceList(); return "" if !$list; - my $ntpd; + my $ntpd = ""; my $isRunning = 0; - foreach $ntpd (@{$list}) { + + foreach (@{$list}) { + $ntpd = $_; $isRunning = $self->sh_services->is_service_running($ntpd); last if $isRunning; } @@ -295,7 +297,7 @@ has 'sh_services' => ( sub _SharedServicesInitialize { my $self = shift(); - $self->sh_services(ManaTools::Shared::Services->new() ); + $self->sh_services(ManaTools::Shared::Services->new(include_static_services => 1) ); } |