Skip to content

Commit

Permalink
Merge pull request #32 from ancorgs/bnc937837
Browse files Browse the repository at this point in the history
Calls to sntp adjusted to the syntax of ntp 4.2.8 (bnc#937837)
  • Loading branch information
ancorgs committed Jul 20, 2015
2 parents f6e1544 + c21af42 commit aafefd3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
7 changes: 7 additions & 0 deletions package/yast2-ntp-client.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jul 20 10:38:30 UTC 2015 - ancor@suse.com

- Calls to sntp adjusted to the syntax of ntp 4.2.8
(bnc#937837, bnc#916617)
- 3.1.16

-------------------------------------------------------------------
Fri Jun 26 11:34:00 UTC 2015 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-ntp-client.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-ntp-client
Version: 3.1.15
Version: 3.1.16
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0+
Expand Down
5 changes: 3 additions & 2 deletions src/clients/ntp-client_proposal.rb
Expand Up @@ -399,12 +399,13 @@ def Write(param)

Builtins.y2milestone("Running sntp to sync with %1", ntp_server)

# -s: do set the system time
# -S: do set the system time
# -t 5: timeout of 5 seconds
# -l <file>: log to a file to not mess text mode installation
# -c: causes all IP addresses to which ntp_server resolves to be queried in parallel
ret = SCR.Execute(
path(".target.bash"),
"/usr/sbin/sntp -l /var/log/YaST2/sntp.log -t 5 -s '#{String.Quote(ntp_server)}'"
"/usr/sbin/sntp -S -l /var/log/YaST2/sntp.log -t 5 -c '#{String.Quote(ntp_server)}'"
)
Builtins.y2milestone("'sntp %1' returned %2", ntp_server, ret)
Popup.ClearFeedback
Expand Down
15 changes: 3 additions & 12 deletions src/modules/NtpClient.rb
Expand Up @@ -1078,20 +1078,11 @@ def TestNtpServer(server, verbosity)

# testing the server using IPv4 and then using IPv6 protocol
# bug #74076, Firewall could have been blocked IPv6
ret_IPv4 = Convert.to_integer(
SCR.Execute(
path(".target.bash"),
Builtins.sformat("/usr/sbin/sntp -4 -t 5 %1", server)
)
)
# -c: concurrently query all IPs; -t 5: five seconds of timeout
ret_IPv4 = SCR.Execute(path(".target.bash"), "/usr/sbin/sntp -4 -t 5 -c #{server}")
ret_IPv6 = 0
if ret_IPv4 != 0
ret_IPv6 = Convert.to_integer(
SCR.Execute(
path(".target.bash"),
Builtins.sformat("/usr/sbin/sntp -6 -t 5 %1", server)
)
)
ret_IPv6 = SCR.Execute(path(".target.bash"), "/usr/sbin/sntp -6 -t 5 -c #{server}")
end

UI.CloseDialog if verbosity != :no_ui
Expand Down

0 comments on commit aafefd3

Please sign in to comment.