From c6df701de37d5d9345f77bc048b8f31901187b67 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Wed, 25 Mar 2015 17:16:13 +0100 Subject: used include_static_services to get also systemd-timesyncd status --- lib/ManaTools/Shared/TimeZone.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') 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) ); } -- cgit v1.2.1