Mailinglist Archive: yast-commit (590 mails)

< Previous Next >
[yast-commit] r61616 - in /trunk/ntp-client: package/yast2-ntp-client.changes src/ntp-client_proposal.ycp
  • From: mvidner@xxxxxxxxxxxxxxxx
  • Date: Thu, 08 Apr 2010 13:48:20 -0000
  • Message-id: <E1Nzs5k-0004QN-F4@xxxxxxxxxxxxxxxx>
Author: mvidner
Date: Thu Apr 8 15:48:20 2010
New Revision: 61616

URL: http://svn.opensuse.org/viewcvs/yast?rev=61616&view=rev
Log:
Added a write_only parameter to ntp-client_proposal:Write,
to fix disabling NTP without trying to sync with it (bnc#589296)

Modified:
trunk/ntp-client/package/yast2-ntp-client.changes
trunk/ntp-client/src/ntp-client_proposal.ycp

Modified: trunk/ntp-client/package/yast2-ntp-client.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/package/yast2-ntp-client.changes?rev=61616&r1=61615&r2=61616&view=diff
==============================================================================
--- trunk/ntp-client/package/yast2-ntp-client.changes (original)
+++ trunk/ntp-client/package/yast2-ntp-client.changes Thu Apr 8 15:48:20 2010
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Thu Apr 8 15:48:00 CEST 2010 - mvidner@xxxxxxx
+
+- Added a write_only parameter to ntp-client_proposal:Write,
+ to fix disabling NTP without trying to sync with it (bnc#589296)
+
------------------------------------------------------------------
Wed Jan 13 18:56:03 CET 2010 - kmachalkova@xxxxxxx


Modified: trunk/ntp-client/src/ntp-client_proposal.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/ntp-client_proposal.ycp?rev=61616&r1=61615&r2=61616&view=diff
==============================================================================
--- trunk/ntp-client/src/ntp-client_proposal.ycp (original)
+++ trunk/ntp-client/src/ntp-client_proposal.ycp Thu Apr 8 15:48:20 2010
@@ -219,11 +219,29 @@
return ret;
}

+boolean WriteNtpSettings (string ntp_server) {
+
+ NtpClient::modified = true;
+ AddSingleServer(ntp_server);
+
+ //OK, so we stored the server address
+ //In inst-sys we don't need to care further
+ //ntp-client_finish will do the job
+ //In installed system we must write the settings
+ if (!Stage::initial()) {
+ Wizard::OpenAcceptDialog(); // FIXME so that the progress does not
disturb the dialog to be returned to
+ NtpClient::Write();
+ Wizard::CloseDialog();
+ }
+ return true;
+}
+
/*
params:
server (taken from UI if empty)
servers (intended to use all of opensuse.pool.ntp.org,
but I did not have time to make it work)
+ write_only (bnc#589296)
ntpdate_only (TODO rename to onetime)
return:
`success, `invalid_hostname or `ntpdate_failed
@@ -237,6 +255,12 @@
if ( !ValidateSingleServer( ntp_server ) )
return `invalid_hostname;

+ if (param["write_only"]:false)
+ {
+ WriteNtpSettings (ntp_server);
+ return `success;
+ }
+
// One-time adjusment without running the ntp daemon
// Meanwhile, ntpdate was replaced by sntp
boolean ntpdate_only = param["ntpdate_only"]:false;
@@ -283,18 +307,7 @@
// User wants to more than running sntp (synchronize on boot)
if (!ntpdate_only)
{
- NtpClient::modified = true;
- AddSingleServer(ntp_server);
-
- //OK, so we stored the server address
- //In inst-sys we don't need to care further
- //ntp-client_finish will do the job
- //In installed system we must write the settings
- if (!Stage::initial()) {
- Wizard::OpenAcceptDialog(); // FIXME so that the progress does not
disturb the dialog to be returned to
- NtpClient::Write();
- Wizard::CloseDialog();
- }
+ WriteNtpSettings (ntp_server);
}

return `success;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages