Skip to content

Commit

Permalink
Merge 2cab15c into 73d265d
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed May 15, 2018
2 parents 73d265d + 2cab15c commit 90a304e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions package/yast2-country.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 15 12:36:33 UTC 2018 - jreidinger@suse.com

- Do not use opensuse ntp pool servers for SLE (bsc#1090168)
- 4.0.22

-------------------------------------------------------------------
Mon May 14 10:26:11 UTC 2018 - jsrain@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-country.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-country
Version: 4.0.21
Version: 4.0.22
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
22 changes: 11 additions & 11 deletions timezone/src/include/timezone/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def initialize_timezone_dialogs(include_target)
Yast.import "NetworkService"
Yast.import "Package"
Yast.import "Popup"
Yast.import "Product"
Yast.import "ProductFeatures"
Yast.import "Service"
Yast.import "Stage"
Expand Down Expand Up @@ -572,22 +573,21 @@ def TimezoneDialog(args)
# true by default (fate#303520)
@ntp_used = true
# configure NTP client
Builtins.srandom
@ntp_server = Builtins.sformat(
"%1.opensuse.pool.ntp.org",
Builtins.random(4)
)
# to prevent misusage of ntp.org we need to distinguish opensuse and SLE usage
base_products = Product.FindBaseProducts
if base_products.any? { |p| p["shortname"] == "openSUSE" }
servers = (0..3).map { |i| "#{i}.opensuse.pool.ntp.org" }
else
servers = (0..3).map { |i| "#{i}.novell.pool.ntp.org" }
end
@ntp_server = servers.sample
argmap = {
"server" => @ntp_server,
# FIXME ntp-client_proposal doesn't understand 'servers' yet
"servers" => [
"0.opensuse.pool.ntp.org",
"1.opensuse.pool.ntp.org",
"2.opensuse.pool.ntp.org",
"3.opensuse.pool.ntp.org"
],
"servers" => servers,
"ntpdate_only" => true
}

rv = Convert.to_symbol(ntp_call("Write", argmap))
if rv == :invalid_hostname
Builtins.y2warning("Invalid NTP server hostname %1", @ntp_server)
Expand Down

0 comments on commit 90a304e

Please sign in to comment.