Author: locilka
Date: Fri Jun 8 17:54:55 2007
New Revision: 38369
URL: http://svn.opensuse.org/viewcvs/yast?rev=38369&view=rev
Log:
- Added initial implementation of possibility to setup network
in the first stage installation. New YCP clients have beed added:
inst_network_check and inst_network_setup. Scripts are called
from inst_system_analysis before sources are initialized
(FATE #301967).
Added:
trunk/installation/src/clients/inst_network_check.ycp
trunk/installation/src/clients/inst_network_setup.ycp
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_system_analysis.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=38369&r1=38368&r2=38369&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Fri Jun 8 17:54:55 2007
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Fri Jun 8 17:52:57 CEST 2007 - locilka@suse.cz
+
+- Added initial implementation of possibility to setup network
+ in the first stage installation. New YCP clients have beed added:
+ inst_network_check and inst_network_setup. Scripts are called
+ from inst_system_analysis before sources are initialized
+ (FATE #301967).
+
+-------------------------------------------------------------------
Thu Jun 7 15:08:08 CEST 2007 - locilka@suse.cz
- A new label "Writing YaST Configuration..." used in case of
Added: trunk/installation/src/clients/inst_network_check.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_network_check.ycp?rev=38369&view=auto
==============================================================================
--- trunk/installation/src/clients/inst_network_check.ycp (added)
+++ trunk/installation/src/clients/inst_network_check.ycp Fri Jun 8 17:54:55 2007
@@ -0,0 +1,79 @@
+{
+/**
+ *
+ * Authors: Lukas Ocilka
+ *
+ * Purpose: This script detects whether there is no active network.
+ * In such case, user can configure network manually.
+ * This should be used in the first stage installation.
+ *
+ * See More: FATE #301967
+ *
+ * $Id:$
+ *
+ */
+
+ textdomain "installation";
+
+ import "NetworkService";
+ import "Wizard";
+
+ /*
+ * We don't need to run this script to setup the network
+ * If some network is already running...
+ */
+
+ Wizard::SetContents (
+ _("Network Setup"),
+ `VBox (
+ `VStretch(),
+ `RadioButtonGroup (
+ `id ("to_do_a_network_setup_or_not_to_do"),
+ `HBox (
+ `HStretch (),
+ `VBox (
+ `Left(`Label (_("No network setup has been found.
+Would you like to configure your network card now?"))),
+ `Left(`RadioButton (`id ("yes_do_run_setup"), _("&Yes, Run the Network Setup"), true)),
+ `Left(`RadioButton (`id ("no_do_not_run_setup"), _("&No, Skip the Network Setup")))
+ ),
+ `HStretch ()
+ )
+ ),
+ `VStretch()
+ ),
+ _("FIXME: help"),
+ false,
+ true
+ );
+ Wizard::SetTitleIcon ("yast-network");
+ Wizard::DisableAbortButton ();
+
+ any ret = nil;
+
+ boolean run_setup = nil;
+
+ while (true) {
+ ret = UI::UserInput();
+
+ if (ret == `next) {
+ string option_selected = (string) UI::QueryWidget (
+ `id ("to_do_a_network_setup_or_not_to_do"), `CurrentButton
+ );
+ y2milestone ("Network setup? %1", option_selected);
+ run_setup = (option_selected == "yes_do_run_setup");
+ break;
+ } else {
+ y2error ("Unknown ret: %1", ret);
+ }
+ }
+
+ if (run_setup) {
+ y2milestone ("Running inst_network_setup");
+ WFM::CallFunction ("inst_network_setup", []);
+ }
+
+ return `next;
+
+ /* EOF */
+}
Added: trunk/installation/src/clients/inst_network_setup.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_network_setup.ycp?rev=38369&view=auto
==============================================================================
--- trunk/installation/src/clients/inst_network_setup.ycp (added)
+++ trunk/installation/src/clients/inst_network_setup.ycp Fri Jun 8 17:54:55 2007
@@ -0,0 +1,984 @@
+{
+/**
+ *
+ * Authors: Lukas Ocilka
+ *
+ * Purpose: This script allows to setup network in first
+ * stage of installation.
+ *
+ * See More: FATE #301967
+ *
+ * $Id:$
+ *
+ */
+
+ textdomain "installation";
+
+ import "Wizard";
+ import "String";
+ import "GetInstArgs";
+ import "IP";
+ import "Label";
+ import "Netmask";
+ import "NetworkService";
+ import "Popup";
+ import "Report";
+ import "Hostname";
+ import "Sequencer";
+ import "Progress";
+ import "FileUtils";
+ import "Mode";
+ import "Stage";
+ import "Progress";
+ import "Proxy";
+
+ /* Variables --> */
+
+ symbol default_ret = GetInstArgs::going_back() ? `back : `next;
+
+ boolean enable_back = GetInstArgs::enable_back();
+ boolean enable_next = GetInstArgs::enable_next();
+
+ boolean enable_back_in_netsetup = true;
+
+ /* Currently probed network cards */
+ list