Skip to content

Commit

Permalink
remove ntpd service
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Nov 1, 2017
1 parent 0ee364e commit 9f99c97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/modules/NtpClient.rb
Expand Up @@ -89,7 +89,7 @@ def main
@cron_file = "/etc/cron.d/novell.ntp-synchronize"

# Service name of the NTP daemon
@service_name = "ntpd"
@service_name = "chronyd"

# Should the daemon be started in chroot environment?
@run_chroot = false
Expand Down Expand Up @@ -1207,7 +1207,7 @@ def update_cron_settings
SCR.Write(
path(".target.string"),
@cron_file,
"-*/#{@sync_interval} * * * * root /usr/sbin/start-ntpd ntptimeset &>/dev/null\n"
"-*/#{@sync_interval} * * * * root /usr/sbin/chronyd -q &>/dev/null\n"
)
else
SCR.Execute(
Expand Down
6 changes: 3 additions & 3 deletions test/ntp_client_test.rb
Expand Up @@ -167,7 +167,7 @@
allow(subject).to receive(:read_chroot_config!)
allow(subject).to receive(:read_policy!)
allow(Yast::SuSEFirewall).to receive(:Read)
allow(Yast::Service).to receive(:Enabled).with("ntpd").and_return(true)
allow(Yast::Service).to receive(:Enabled).with("chronyd").and_return(true)
allow(Yast::NetworkInterfaces).to receive(:Read)
allow(Yast::Progress)
allow(Yast::PackageSystem).to receive(:CheckAndInstallPackagesInteractive)
Expand Down Expand Up @@ -229,8 +229,8 @@
end
end

it "checks if ntpd service is enable" do
expect(Yast::Service).to receive(:Enabled).with("ntpd")
it "checks if chronyd service is enable" do
expect(Yast::Service).to receive(:Enabled).with("chronyd")

subject.Read
end
Expand Down

0 comments on commit 9f99c97

Please sign in to comment.