Skip to content

Commit

Permalink
Merge pull request #47 from teclator/Code-11-SP1
Browse files Browse the repository at this point in the history
Calls to sntp adjusted to syntax from ntp 4.2.8 (FATE#320394)
  • Loading branch information
teclator committed Apr 15, 2016
2 parents 3d42f76 + 40c19cf commit 675b84a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.17.14
2.17.14.1
7 changes: 7 additions & 0 deletions package/yast2-ntp-client.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Apr 11 09:16:37 CEST 2016 - kanderssen@suse.com

- Calls to sntp adjusted to the syntax of ntp 4.2.8
(bnc#916617, FATE#320394)
- 2.17.14.1

-------------------------------------------------------------------
Wed Apr 21 16:39:38 CEST 2010 - varkoly@suse.de

Expand Down
7 changes: 4 additions & 3 deletions src/NtpClient.ycp
Expand Up @@ -937,15 +937,16 @@ global boolean TestNtpServer (string server, symbol verbosity) {

// testing the server using IPv4 and then using IPv6 protocol
// bug #74076, Firewall could have been blocked IPv6
// -c 1 -d 15: delay 15s, only one try (bnc#442287)
// -K /dev/null: use /dev/null as KoD history file (if not specified, /var/db/ntp-kod will be used and it doesn't exist)
// -c: concurrently query all IPs; -t 5: five seconds of timeout
integer ret_IPv4 = (integer) SCR::Execute (.target.bash, sformat (
"/usr/sbin/sntp -4 -c 1 -d 15 %1",
"/usr/sbin/sntp -4 -K /dev/null -t 5 -c %1",
server
));
integer ret_IPv6 = 0;
if (ret_IPv4 != 0)
ret_IPv6 = (integer) SCR::Execute (.target.bash, sformat (
"/usr/sbin/sntp -6 -c 1 -d 15 %1",
"/usr/sbin/sntp -6 -K /dev/null -t 5 -c %1",
server
));

Expand Down
13 changes: 9 additions & 4 deletions src/ntp-client_proposal.ycp
Expand Up @@ -236,10 +236,15 @@ without having package %1 installed"), required_package));

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

// -r: do set the system time
// -P no: do not ask if time difference is too large
// -c 1 -d 15: delay 15s, only one try (bnc#442287)
integer r = (integer) SCR::Execute (.target.bash, sformat ("/usr/sbin/sntp -c 1 -d 15 -r -P no '%1'", String::Quote(ntp_server)));
// -S: do set the system time
// -t 5: timeout of 5 seconds
// -K /dev/null: use /dev/null as KoD history file (if not specified, /var/db/ntp-kod will be used and it doesn't exist)
// -l <file>: log to a file to not mess text mode installation
// -c: causes all IP addresses to which %1 resolves to be queried in parallel
integer r = (integer) SCR::Execute (
.target.bash,
sformat("/usr/sbin/sntp -S -K /dev/null -l /var/log/YaST2/sntp.log -t 5 -c '%1'", String::Quote(ntp_server))
);
y2milestone ("'sntp %1' returned %2", ntp_server, r);

Popup::ClearFeedback();
Expand Down
16 changes: 11 additions & 5 deletions yast2-ntp-client.spec.in
@@ -1,16 +1,22 @@
@HEADER-COMMENT@

@HEADER@
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
BuildRequires: yast2-country-data
BuildRequires: perl-XML-Writer
BuildRequires: update-desktop-files
BuildRequires: yast2
BuildRequires: yast2-country-data
BuildRequires: yast2-devtools
BuildRequires: yast2-testsuite
#SLPAPI.pm
# Hostname::CurrentDomain
Requires: yast2 >= 2.16.48
Requires: yast2-country-data
Requires: yast2 >= 2.16.48
Requires: yast2-country-data
# New sntp command line syntax
Conflicts: ntp < 4.2.8

BuildArchitectures: noarch

Summary: Configuration of ntp-client
Summary: YaST2 - NTP Client Configuration

%description
-
Expand Down

0 comments on commit 675b84a

Please sign in to comment.