Author: mzugec
Date: Tue Mar 10 15:21:18 2009
New Revision: 56052
URL: http://svn.opensuse.org/viewcvs/yast?rev=56052&view=rev
Log:
CLI can set wizardmode (bnc#378743)
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/http-server.ycp
trunk/http-server/src/wizards.ycp
Modified: trunk/http-server/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/VERSION?rev=56052&r1=56051&r2=56052&view=diff
==============================================================================
--- trunk/http-server/VERSION (original)
+++ trunk/http-server/VERSION Tue Mar 10 15:21:18 2009
@@ -1 +1 @@
-2.18.3
+2.18.4
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=56052&r1=56051&r2=56052&view=diff
==============================================================================
--- trunk/http-server/package/yast2-http-server.changes (original)
+++ trunk/http-server/package/yast2-http-server.changes Tue Mar 10 15:21:18 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Mar 10 15:17:03 CET 2009 - mzugec@suse.cz
+
+- CLI can set wizardmode (bnc#378743)
+- 2.18.4
+
+-------------------------------------------------------------------
Mon Mar 9 09:28:02 CET 2009 - mzugec@suse.cz
- handling of custom modules (see bnc#482424)
Modified: trunk/http-server/src/HttpServer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServer.ycp?rev=56052&r1=56051&r2=56052&view=diff
==============================================================================
--- trunk/http-server/src/HttpServer.ycp (original)
+++ trunk/http-server/src/HttpServer.ycp Tue Mar 10 15:21:18 2009
@@ -80,6 +80,22 @@
list<string> files_to_check = ["/etc/sysconfig/apache2", "/etc/apache2/default-server.conf", "/etc/apache2/httpd.conf", "/etc/apache2/listen.conf", "/etc/apache2/vhosts.d/yast2_vhosts.conf"];
+global boolean isWizardMode(){
+ if ($[] == SCR::Read (.target.stat, Directory::vardir + "/http_server")) return true;
+ else return false;
+}
+
+global void setWizardMode(boolean w_mode){
+ if(w_mode==true){
+ SCR::Execute(.target.bash, sformat("rm %1%2", Directory::vardir, "/http_server"));
+ y2milestone("Set wizardmode on");
+ }
+ else{
+ SCR::Write ( .target.string, Directory::vardir + "/http_server", "");
+ y2milestone("Set wizardmode off");
+ }
+}
+
/**
* Read all http-server settings
* @return true on success
@@ -247,18 +263,6 @@
// add DHCP ones, if we can find out the current IP
devs = NetworkInterfaces::Locate("BOOTPROTO", "dhcp");
foreach(string dev, devs, {
-/*
-y2internal("dhcp devs %1", devs);
- // first, convert to the current name
- map output = (map)SCR::Execute (.target.bash_output, "/sbin/getcfg-interface " + dev);
-
- if (output["exit"]:-1 != 0 || output["stdout"]:"" == "0" )
- {
- continue;
- }
-
- string device = output["stdout"]:"";
-*/
map output = (map)SCR::Execute (.target.bash_output, "/sbin/ifconfig "+dev, $["LC_MESSAGES":"C"] );
if (output["exit"]:-1 == 0)
{
@@ -374,13 +378,6 @@
// Wrong, service still has to be enabled...
// if( write_only ) return true;
-// // run SuSEconfig
-// if (!write_only) {
-// if( SCR::Execute( .target.bash, "/sbin/SuSEconfig --module apache2" ) != 0 ) {
-// // translators: error message
-// Report::Error( Message::SuSEConfigFailed() );
-// }
-// }
Progress::NextStage();
@@ -414,8 +411,6 @@
foreach(string file, files_to_check, {
FileChanges::StoreFileCheckSum( file );
});
- SCR::Write ( .target.string, Directory::vardir + "/http_server", "");
-
// translators: progress finished
ProgressNextStage(_("Finished"));
Modified: trunk/http-server/src/HttpServerWidgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServerWidgets.ycp?rev=56052&r1=56051&r2=56052&view=diff
==============================================================================
--- trunk/http-server/src/HttpServerWidgets.ycp (original)
+++ trunk/http-server/src/HttpServerWidgets.ycp Tue Mar 10 15:21:18 2009
@@ -2913,6 +2913,7 @@
UI::ReplaceWidget(`id(`summary_text_rp), `RichText( HttpServer::Summary()[0]:"error" ));
}
+
/* EOF */
}
Modified: trunk/http-server/src/http-server.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/http-server.ycp?rev=56052&r1=56051&r2=56052&view=diff
==============================================================================
--- trunk/http-server/src/http-server.ycp (original)
+++ trunk/http-server/src/http-server.ycp Tue Mar 10 15:21:18 2009
@@ -305,6 +305,18 @@
return true;
}
+define boolean ModeHandler(map