[yast-commit] r64744 - in /trunk/ntp-client/src: NtpClient.ycp ntp-client_proposal.ycp
![](https://seccdn.libravatar.org/avatar/dbaac9b710153189a7ab78c8e9087807.jpg?s=120&d=mm&r=g)
Author: varkoly Date: Tue Jul 5 12:17:48 2011 New Revision: 64744 URL: http://svn.opensuse.org/viewcvs/yast?rev=64744&view=rev Log: bnc#680764 - ntp synchronization before i can configure the source Modified: trunk/ntp-client/src/NtpClient.ycp trunk/ntp-client/src/ntp-client_proposal.ycp Modified: trunk/ntp-client/src/NtpClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/NtpClient.ycp?rev=... ============================================================================== --- trunk/ntp-client/src/NtpClient.ycp (original) +++ trunk/ntp-client/src/NtpClient.ycp Tue Jul 5 12:17:48 2011 @@ -997,13 +997,13 @@ // testing the server using IPv4 and then using IPv6 protocol // bug #74076, Firewall could have been blocked IPv6 integer ret_IPv4 = (integer) SCR::Execute (.target.bash, sformat ( - "/usr/sbin/sntp -4 -t 15 %1", + "/usr/sbin/sntp -4 -t 5 %1", server )); integer ret_IPv6 = 0; if (ret_IPv4 != 0) ret_IPv6 = (integer) SCR::Execute (.target.bash, sformat ( - "/usr/sbin/sntp -6 -t 15 %1", + "/usr/sbin/sntp -6 -t 5 %1", server )); Modified: trunk/ntp-client/src/ntp-client_proposal.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/ntp-client_proposa... ============================================================================== --- trunk/ntp-client/src/ntp-client_proposal.ycp (original) +++ trunk/ntp-client/src/ntp-client_proposal.ycp Tue Jul 5 12:17:48 2011 @@ -317,17 +317,20 @@ without having package %1 installed"), required_package)); } } + integer r = 0; + if (NetworkService::isNetworkRunning()) { + //Only if network is running try to synchronize the ntp server + Popup::ShowFeedback("", _("Synchronizing with NTP server...")); - Popup::ShowFeedback("", _("Synchronizing with NTP server...")); + y2milestone("Running sntp to sync with %1", ntp_server); - y2milestone("Running sntp to sync with %1", ntp_server); - - // -s: do set the system time - // -t 15: timeout 15s per one of 5 tries - integer r = (integer) SCR::Execute (.target.bash, sformat ("/usr/sbin/sntp -t 15 -s '%1'", String::Quote(ntp_server))); - y2milestone ("'sntp %1' returned %2", ntp_server, r); + // -s: do set the system time + // -t 15: timeout 5s per one of 5 tries + integer r = (integer) SCR::Execute (.target.bash, sformat ("/usr/sbin/sntp -t 5 -s '%1'", String::Quote(ntp_server))); + y2milestone ("'sntp %1' returned %2", ntp_server, r); + Popup::ClearFeedback(); + } - Popup::ClearFeedback(); if (r != 0) return `ntpdate_failed; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
varkoly@svn2.opensuse.org