Mailinglist Archive: yast-commit (490 mails)
| < Previous | Next > |
[yast-commit] r38454 - in /trunk/installation: package/yast2-installation.changes src/clients/inst_network_setup.ycp
- From: locilka@xxxxxxxxxxxxxxxx
- Date: Thu, 14 Jun 2007 11:08:26 -0000
- Message-id: <20070614110826.F042E23824@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Thu Jun 14 13:08:26 2007
New Revision: 38454
URL: http://svn.opensuse.org/viewcvs/yast?rev=38454&view=rev
Log:
- Enhanced network-test in the fist stage installation, three
different web-servers are tested with curl instead of only one.
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_network_setup.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=38454&r1=38453&r2=38454&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Thu Jun 14 13:08:26 2007
@@ -5,6 +5,8 @@
different servers are tested with 'ping' instead of only one.
- Current network settings are logged in case of failed network
test (both #283841).
+- Enhanced network-test in the fist stage installation, three
+ different web-servers are tested with curl instead of only one.
-------------------------------------------------------------------
Wed Jun 13 15:44:05 CEST 2007 - locilka@xxxxxxx
Modified: trunk/installation/src/clients/inst_network_setup.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_network_setup.ycp?rev=38454&r1=38453&r2=38454&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_network_setup.ycp (original)
+++ trunk/installation/src/clients/inst_network_setup.ycp Thu Jun 14 13:08:26 2007
@@ -1045,7 +1045,7 @@
// Testing more addresses, at least one should succeed
foreach (string one_address, ["novell.com", "www.opensuse.org", "www.suse.com"], {
- string cmd = sformat ("/bin/ping -q -n -c1 %1", one_address);
+ string cmd = sformat ("/bin/ping -q -n -c1 '%1'", String::Quote (one_address));
map run_cmd = (map) SCR::Execute (.target.bash_output, cmd);
y2milestone ("Running %1 returned %2", cmd, run_cmd);
@@ -1077,20 +1077,44 @@
return false;
}
- string cmd = "curl www.novell.com 1>/dev/null";
- map run_cmd = (map) SCR::Execute (.target.bash_output, cmd);
- y2milestone ("Running %1 returned %2", cmd, run_cmd);
+ boolean www_result = false;
+ map www_failed = $[];
+ string cmd_failed_www = "";
+
+ foreach (string www_address, [
+ "http://www.novell.com",
+ "http://www.opensuse.org",
+ "http://www.suse.com"
+ ], {
+ string cmd = sformat ("curl '%1' 1>/dev/null", String::Quote (www_address));
+ map run_cmd = (map) SCR::Execute (.target.bash_output, cmd);
+ y2milestone ("Running %1 returned %2", cmd, run_cmd);
- if (run_cmd["exit"]:-1 != 0) {
+ // Comand failed
+ if (run_cmd["exit"]:-1 != 0) {
+ // Store the last failed command output
+ www_failed = run_cmd;
+ cmd_failed_www = cmd;
+ // Success
+ } else {
+ // A successfull ping means we do not need to test more of them
+ www_result = true;
+ break;
+ }
+ });
+
+ // All curl-commands failed
+ if (www_result != true) {
LogDebugInformation();
// TRANSLATORS: popup headline
- ReportMoreErrorInformationIfPossible (cmd, run_cmd, _("Internet Test Failed"));
+ ReportMoreErrorInformationIfPossible (cmd_failed_www, www_failed, _("Internet Test Failed"));
if (SkipFailedInetTest()) {
y2warning ("Internet test failed, but skipping the rest on user's request...");
return true;
}
+
return false;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Thu Jun 14 13:08:26 2007
New Revision: 38454
URL: http://svn.opensuse.org/viewcvs/yast?rev=38454&view=rev
Log:
- Enhanced network-test in the fist stage installation, three
different web-servers are tested with curl instead of only one.
Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/clients/inst_network_setup.ycp
Modified: trunk/installation/package/yast2-installation.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=38454&r1=38453&r2=38454&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Thu Jun 14 13:08:26 2007
@@ -5,6 +5,8 @@
different servers are tested with 'ping' instead of only one.
- Current network settings are logged in case of failed network
test (both #283841).
+- Enhanced network-test in the fist stage installation, three
+ different web-servers are tested with curl instead of only one.
-------------------------------------------------------------------
Wed Jun 13 15:44:05 CEST 2007 - locilka@xxxxxxx
Modified: trunk/installation/src/clients/inst_network_setup.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_network_setup.ycp?rev=38454&r1=38453&r2=38454&view=diff
==============================================================================
--- trunk/installation/src/clients/inst_network_setup.ycp (original)
+++ trunk/installation/src/clients/inst_network_setup.ycp Thu Jun 14 13:08:26 2007
@@ -1045,7 +1045,7 @@
// Testing more addresses, at least one should succeed
foreach (string one_address, ["novell.com", "www.opensuse.org", "www.suse.com"], {
- string cmd = sformat ("/bin/ping -q -n -c1 %1", one_address);
+ string cmd = sformat ("/bin/ping -q -n -c1 '%1'", String::Quote (one_address));
map run_cmd = (map) SCR::Execute (.target.bash_output, cmd);
y2milestone ("Running %1 returned %2", cmd, run_cmd);
@@ -1077,20 +1077,44 @@
return false;
}
- string cmd = "curl www.novell.com 1>/dev/null";
- map run_cmd = (map) SCR::Execute (.target.bash_output, cmd);
- y2milestone ("Running %1 returned %2", cmd, run_cmd);
+ boolean www_result = false;
+ map www_failed = $[];
+ string cmd_failed_www = "";
+
+ foreach (string www_address, [
+ "http://www.novell.com",
+ "http://www.opensuse.org",
+ "http://www.suse.com"
+ ], {
+ string cmd = sformat ("curl '%1' 1>/dev/null", String::Quote (www_address));
+ map run_cmd = (map) SCR::Execute (.target.bash_output, cmd);
+ y2milestone ("Running %1 returned %2", cmd, run_cmd);
- if (run_cmd["exit"]:-1 != 0) {
+ // Comand failed
+ if (run_cmd["exit"]:-1 != 0) {
+ // Store the last failed command output
+ www_failed = run_cmd;
+ cmd_failed_www = cmd;
+ // Success
+ } else {
+ // A successfull ping means we do not need to test more of them
+ www_result = true;
+ break;
+ }
+ });
+
+ // All curl-commands failed
+ if (www_result != true) {
LogDebugInformation();
// TRANSLATORS: popup headline
- ReportMoreErrorInformationIfPossible (cmd, run_cmd, _("Internet Test Failed"));
+ ReportMoreErrorInformationIfPossible (cmd_failed_www, www_failed, _("Internet Test Failed"));
if (SkipFailedInetTest()) {
y2warning ("Internet test failed, but skipping the rest on user's request...");
return true;
}
+
return false;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |