Author: varkoly Date: Wed Feb 9 12:50:35 2011 New Revision: 63379 URL: http://svn.opensuse.org/viewcvs/yast?rev=63379&view=rev Log: Now we can write in proposal more then one ntp server Modified: trunk/ntp-client/src/ntp-client_proposal.ycp 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=63379&r1=63378&r2=63379&view=diff ============================================================================== --- trunk/ntp-client/src/ntp-client_proposal.ycp (original) +++ trunk/ntp-client/src/ntp-client_proposal.ycp Wed Feb 9 12:50:35 2011 @@ -231,10 +231,19 @@ return ret; } -boolean WriteNtpSettings (string ntp_server,boolean run_service) { +boolean WriteNtpSettings (list ntp_servers, string ntp_server, boolean run_service) { NtpClient::modified = true; - AddSingleServer(ntp_server); + if ( ntp_servers != [] ) + { + foreach (string server, ntp_servers, { + AddSingleServer(server); + }); + } + else + { + AddSingleServer(ntp_server); + } if( ! run_service ) { NtpClient::synchronize_time=true; @@ -266,6 +275,7 @@ */ symbol Write(map param) { symbol ret = nil; + list ntp_servers = param["servers"]:[]; string ntp_server = param["server"]:""; boolean run_service = param["run_service"]:true; if (ntp_server == "") @@ -276,7 +286,7 @@ if (param["write_only"]:false) { - WriteNtpSettings (ntp_server,run_service); + WriteNtpSettings (ntp_servers,ntp_server,run_service); return `success; } @@ -325,7 +335,7 @@ // User wants to more than running sntp (synchronize on boot) if (!ntpdate_only) { - WriteNtpSettings (ntp_server,run_service); + WriteNtpSettings (ntp_servers,ntp_server,run_service); } return `success; @@ -393,7 +403,7 @@ } else if (!argmap["ntpdate_only"]:false) { - WriteNtpSettings (server,argmap["run_service"]:false); //may be the server is realy not accessable + WriteNtpSettings ([],server,argmap["run_service"]:false); //may be the server is realy not accessable } } // success, exit -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org