Author: gs Date: Wed Jun 29 14:59:27 2011 New Revision: 64636 URL: http://svn.opensuse.org/viewcvs/yast?rev=64636&view=rev Log: bugfix map output, don't write configuration in case of FCoE interface creation fails Modified: trunk/fcoe-client/src/fcoe-client_auto.ycp Modified: trunk/fcoe-client/src/fcoe-client_auto.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/fcoe-client_auto.ycp?rev=64636&r1=64635&r2=64636&view=diff ============================================================================== --- trunk/fcoe-client/src/fcoe-client_auto.ycp (original) +++ trunk/fcoe-client/src/fcoe-client_auto.ycp Wed Jun 29 14:59:27 2011 @@ -96,6 +96,7 @@ /* Write givven settings */ else if (func == "Write") { import "Progress"; + boolean write = true; boolean progress_orig = Progress::set (false); FcoeClient::SetWriteOnly (true); // prepare for AutoYaST @@ -104,18 +105,19 @@ string vlan_interface = ""; string fcoe_vlan_interface = ""; string command = ""; - string output = ""; + map output = $[]; if ( card["fcoe_vlan"]:"" != FcoeClient::NOT_AVAILABLE && card["fcoe_vlan"]:"" != FcoeClient::NOT_CONFIGURED ) { - // create and start FcoE - TODO: what to do in case of error??? + // create and start FcoE command = sformat( "fipvlan -c -s %1", card["dev_name"]:"" ); output = (map)SCR::Execute( .target.bash_output, command ); y2milestone( "Output: %1", output ); if ( output["exit"]:255 != 0 ) { - y2error( "Cannot create and start FCoE on %1", card["dev_name"]:"" ); + y2error( "Cannot create and start FCoE on %1", card["dev_name"]:"" ); + write = false; // don't write configuration } else { @@ -126,12 +128,20 @@ if ( fcoe_vlan_interface != card["fcoe_vlan"]:"" ) { y2error( "FCoE VLAN interface not correct - created: %1, imported: %2", - fcoe_vlan_interface, card["fcoe_vlan"]:"" ); + fcoe_vlan_interface, card["fcoe_vlan"]:"" ); + write = false; // don't write configuration } } } }); - ret = FcoeClient::Write(); + if ( write ) + { + ret = FcoeClient::Write(); + } + else // don't continue in case of error + { + ret = false; + } Progress::set (progress_orig); } /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org