Author: gs
Date: Wed Nov 30 10:58:12 2011
New Revision: 66973
URL: http://svn.opensuse.org/viewcvs/yast?rev=66973&view=rev
Log:
don't allow to change AUTO_VLAN setting for a
configured device, call fcoeadm -d correctly
Modified:
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp?rev=66973&r1=66972&r2=66973&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/complex.ycp Wed Nov 30 10:58:12 2011
@@ -83,7 +83,10 @@
y2milestone( "Calling %1", command );
map output = (map)SCR::Execute( .target.bash_output, command );
y2milestone( "Output: %1", output );
-
+ if ( output["exit"]:255 != 0 )
+ {
+ Popup::Error( sformat( _("Command %1 failed"), command ) );
+ }
} );
FcoeClient::ResetRevertCommands(); // important during installation
}
@@ -237,6 +240,12 @@
UI::ChangeWidget( `id(`fcoe), `Value, card["fcoe_enable"]:"" );
UI::ChangeWidget( `id(`dcb), `Value, card["dcb_required"]:"" );
UI::ChangeWidget( `id(`auto), `Value, card["auto_vlan"]:"" );
+ if ( card["fcoe_vlan"]:"" != FcoeClient::NOT_CONFIGURED )
+ {
+ // don't allow to change AUTO_VLAN for a configured interface
+ // (would require new /etc/fcoe/cfg-file)
+ UI::ChangeWidget( `id(`auto), `Enabled, false );
+ }
// headline of the edit dialog - configuration of values for a certain network interface
UI::ChangeWidget( `id(`heading), `Value, sformat( _("Configuration of Interface %1"), card["fcoe_vlan"]:"" ) );
}
@@ -346,7 +355,7 @@
y2milestone( "Starting FCoE canceled" );
return nil;
}
-
+
// Get values and exchange list (table) entries
fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", card["vlan_interface"]:"" );
@@ -358,7 +367,7 @@
status_map = FcoeClient::GetFcoeStatus ( fcoe_vlan_interface, card["dev_name"]:"" );
// command to be able to revert the creation of FCoE VLAN interface in case of 'Cancel'
- FcoeClient::AddRevertCommand( sformat("fcoeadm -d %1 && vconfig rem %1", fcoe_vlan_interface ) );
+ FcoeClient::AddRevertCommand( sformat("fcoeadm -d %1 && vconfig rem %2", status_map["cfg_device"]:"", fcoe_vlan_interface ) );
}
else
{
@@ -417,7 +426,7 @@
y2milestone( "Removing %1", card["fcoe_vlan"]:"" );
// call fcoeadm -d