Author: mzugec
Date: Mon Jun 9 17:09:52 2008
New Revision: 48180
URL: http://svn.opensuse.org/viewcvs/yast?rev=48180&view=rev
Log:
DnsServerAPI moved from dns-server into yast2 (bnc#392606)
Modified:
trunk/http-server/VERSION
trunk/http-server/package/yast2-http-server.changes
trunk/http-server/src/HttpServer.ycp
trunk/http-server/src/HttpServerWidgets.ycp
trunk/http-server/src/dialogs.ycp
trunk/http-server/yast2-http-server.spec.in
Modified: trunk/http-server/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/VERSION?rev=48180&r1=48179&r2=48180&view=diff
==============================================================================
--- trunk/http-server/VERSION (original)
+++ trunk/http-server/VERSION Mon Jun 9 17:09:52 2008
@@ -1 +1 @@
-2.16.9
+2.16.10
Modified: trunk/http-server/package/yast2-http-server.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/package/yast2-http-server.changes?rev=48180&r1=48179&r2=48180&view=diff
==============================================================================
--- trunk/http-server/package/yast2-http-server.changes (original)
+++ trunk/http-server/package/yast2-http-server.changes Mon Jun 9 17:09:52 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Jun 9 17:05:44 CEST 2008 - mzugec@suse.cz
+
+- DnsServerAPI moved from dns-server into yast2 (bnc#392606)
+- 2.16.10
+
+-------------------------------------------------------------------
Fri May 16 16:40:22 CEST 2008 - jsrain@suse.cz
- added categories Settings and System into desktop file
Modified: trunk/http-server/src/HttpServer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServer.ycp?rev=48180&r1=48179&r2=48180&view=diff
==============================================================================
--- trunk/http-server/src/HttpServer.ycp (original)
+++ trunk/http-server/src/HttpServer.ycp Mon Jun 9 17:09:52 2008
@@ -59,7 +59,7 @@
*/
global boolean write_only = false;
-boolean configured_dns = false;
+global boolean configured_dns = false;
/**
* Data was modified?
* @return true if modified
@@ -184,10 +184,14 @@
Progress::set(false); //off();
SuSEFirewall::Read();
- if ((Package::Installed("bind")) &&(false == SCR::Read (.target.stat, Directory::vardir + "/dns_server"))){
- DnsServerAPI::Read();
- configured_dns = true;
- }
+ if (Package::Installed("bind")){
+ if(size((map)SCR::Read (.target.stat, Directory::vardir + "/dns_server"))>0){
+ if ( Service::Status("named") == 0 ){
+ if(DnsServerAPI::Read()) configured_dns = true;
+ } else y2milestone(_("There is no DNS server running on this machine."));
+ } else y2warning("DNS server is not correctly configured via YaST.");
+ } else y2warning("Package bind is not installed.");
+ y2internal("DNS running and configured: %1", configured_dns);
Progress::set(true); //on();
// read current settings from httpd.conf and sysconfig
Modified: trunk/http-server/src/HttpServerWidgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServerWidgets.ycp?rev=48180&r1=48179&r2=48180&view=diff
==============================================================================
--- trunk/http-server/src/HttpServerWidgets.ycp (original)
+++ trunk/http-server/src/HttpServerWidgets.ycp Mon Jun 9 17:09:52 2008
@@ -37,6 +37,7 @@
import "DNS";
import "Arch";
import "PackageSystem";
+ import "Map";
include "http-server/helps.ycp";
@@ -1152,29 +1153,32 @@
global void initVhostDetails(string key){
map servername = find(map row, vhost_descr,``(row["KEY"]:"" == "ServerName"));
+ map ip = find(map row, vhost_descr,``(row["KEY"]:"" == "HostIP"));
+
dns_zone="";
- if (Package::Installed("bind"))
- {
- if ( Service::Status("named") == 0 ){
- foreach(string key, map value, (map >) DnsServerAPI::GetZones(), {
- if ( (value["type"]:"" == "master")
- && (regexpmatch(servername["VALUE"]:"", "\\."+key+"$" ))
- && (size(key)>size(dns_zone)) ) dns_zone=key;
+ if (HttpServer::configured_dns)
+ {
+ if (IP::Check4(ip["VALUE"]:""))
+ {
+ foreach(string key, map value, (map >) DnsServerAPI::GetZones(), {
+ if ( value["type"]:"" == "master" ){
+ if (regexpmatch(servername["VALUE"]:"", "\\."+key+"$" ) && (size(key)>size(dns_zone)) ) dns_zone=key;
y2milestone(_("Master Zone %1"), key);
- });
- if (size(dns_zone)>0)
- {
- y2milestone("Matching zone %1", dns_zone);
- boolean exists=false;
- foreach(map records, DnsServerAPI::GetZoneRRs(dns_zone), {
- if (records["key"]:"" == servername["VALUE"]:"" || records["key"]:"" == servername["VALUE"]:""+".") exists=true;
- });
- if (exists == true)
- {
- y2milestone(_("Record %1 already exists in zone %2."), servername["VALUE"]:"", dns_zone);
- } else {
- UI::ReplaceWidget(`replace, `Frame(_("DNS Settings"),
+ } else y2warning("Zone %1 is not type master", key);
+ });
+ if (size(dns_zone)>0)
+ {
+ y2milestone("Matching zone %1", dns_zone);
+ boolean exists=false;
+ foreach(map records, DnsServerAPI::GetZoneRRs(dns_zone), {
+ if (records["key"]:"" == servername["VALUE"]:"" || records["key"]:"" == servername["VALUE"]:""+".") exists=true;
+ });
+ if (exists == true)
+ {
+ y2milestone(_("Record %1 already exists in zone %2."), servername["VALUE"]:"", dns_zone);
+ } else {
+ UI::ReplaceWidget(`replace, `Frame(_("DNS Settings"),
`Left(
`HBox(
`Label(servername["VALUE"]:""),
@@ -1183,23 +1187,24 @@
}
- } else {
- list <string> opts = splitstring(servername["VALUE"]:"", ".");
- opts[0] = nil;
- list <string> newList=[];
- foreach(string it, opts, {
- if (it !=nil){
- list <string> tmpList=[];
- foreach(string itzone, newList, {
- tmpList = add(tmpList, itzone+"."+it);
- });
- newList=tmpList;
- newList = add(newList, it);
- }
- });
+ } else {
+ list <string> opts = splitstring(servername["VALUE"]:"", ".");
+ opts[0] = nil;
+ list <string> newList=[];
+ foreach(string it, opts, {
+ if (it !=nil){
+ list <string> tmpList=[];
+ foreach(string itzone, newList, {
+ if (!contains(Map::Keys(DnsServerAPI::GetZones()), itzone+"."+it)) tmpList = add(tmpList, itzone+"."+it);
+ else y2warning("%1 is already configured zone", itzone+"."+it);
+ });
+ newList=tmpList;
+ newList = add(newList, it);
+ }
+ });
- if (size(opts)>0)
- UI::ReplaceWidget(`replace, `Frame(_("DNS Settings"),
+ if (size(opts)>0)
+ UI::ReplaceWidget(`replace, `Frame(_("DNS Settings"),
`Left(
`HBox(
`Label(servername["VALUE"]:""),
@@ -1207,15 +1212,14 @@
`PushButton(`id(`dns_create_zone), _("Create New Zone"))
))));
- }
- } else y2milestone(_("There is no DNS server running on this machine."));
- }
+ }
+ } else y2warning("%1 is not valid IP4 address", ip["VALUE"]:"");
+ }
// disable using SSL for name-based virtual host
foreach(map row, vhost_descr, {
if (row["KEY"]:"" == "VirtualByName" && row["VALUE"]:"0" =="1") UI::ChangeWidget(`ssl_support, `Enabled, false);
});
-
}
global define symbol handleVhostDetails (string key, map event){
Modified: trunk/http-server/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/dialogs.ycp?rev=48180&r1=48179&r2=48180&view=diff
==============================================================================
--- trunk/http-server/src/dialogs.ycp (original)
+++ trunk/http-server/src/dialogs.ycp Mon Jun 9 17:09:52 2008
@@ -23,8 +23,6 @@
import "CWM";
import "CWMTab";
import "Wizard";
- import "DnsServerAPI";
- import "DnsServer";
import "Service";
import "TablePopup";
import "Package";
Modified: trunk/http-server/yast2-http-server.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/yast2-http-server.spec.in?rev=48180&r1=48179&r2=48180&view=diff
==============================================================================
--- trunk/http-server/yast2-http-server.spec.in (original)
+++ trunk/http-server/yast2-http-server.spec.in Mon Jun 9 17:09:52 2008
@@ -1,10 +1,10 @@
@HEADER-COMMENT@
@HEADER@
-BuildRequires: yast2-dns-server yast2-network docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-devtools yast2-packagemanager-devel yast2-perl-bindings yast2-testsuite libzio
-Requires: yast2-network yast2-perl-bindings libzio yast2-dns-server
-# yast2/NeworkDevices -> yast2/NetworkInterfaces
-Requires: yast2 >= 2.16.23
+BuildRequires: yast2-network docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-devtools yast2-packagemanager-devel yast2-perl-bindings yast2-testsuite libzio
+Requires: yast2-network yast2-perl-bindings libzio
+# DnsServerApi moved to yast2.rpm (bnc#392606)
+Requires: yast2 >= 2.16.73
BuildArchitectures: noarch
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org