Author: gs
Date: Thu Sep 22 13:58:38 2011
New Revision: 65916
URL: http://svn.opensuse.org/viewcvs/yast?rev=65916&view=rev
Log:
several improvements and bug-fixes
Modified:
trunk/fcoe-client/VERSION
trunk/fcoe-client/package/yast2-fcoe-client.changes
trunk/fcoe-client/src/FcoeClient.ycp
trunk/fcoe-client/src/complex.ycp
trunk/fcoe-client/src/dialogs.ycp
trunk/fcoe-client/src/fcoe-client_auto.ycp
trunk/fcoe-client/src/fcoe-client_finish.ycp
trunk/fcoe-client/src/helps.ycp
trunk/fcoe-client/src/inst_fcoe-client.ycp
trunk/fcoe-client/src/wizards.ycp
Modified: trunk/fcoe-client/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/VERSION?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/VERSION (original)
+++ trunk/fcoe-client/VERSION Thu Sep 22 13:58:38 2011
@@ -1 +1 @@
-2.21.6
+2.21.7
Modified: trunk/fcoe-client/package/yast2-fcoe-client.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/package/yast2-fcoe-client.changes?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/package/yast2-fcoe-client.changes (original)
+++ trunk/fcoe-client/package/yast2-fcoe-client.changes Thu Sep 22 13:58:38 2011
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Thu Sep 22 13:48:10 CEST 2011 - gs@suse.de
+
+- Several improvements (add 'Remove Interface', allow to change
+ settings before creating FCoE interface, respect AUTO_VLAN) and
+ bug-fixes (bnc #705171, bnc #705610, bnc #692403, bnc #710390)
+- 2.21.7
+
+-------------------------------------------------------------------
Mon Sep 19 14:34:30 CEST 2011 - visnov@suse.cz
- removed unneeded import
Modified: trunk/fcoe-client/src/FcoeClient.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/FcoeClient.ycp (original)
+++ trunk/fcoe-client/src/FcoeClient.ycp Thu Sep 22 13:58:38 2011
@@ -44,6 +44,7 @@
import "Popup";
import "Service";
import "NetworkService";
+import "String";
/**
* Prototypes
@@ -166,6 +167,7 @@
global boolean lldpad_started = false; // service fcoe was started
global boolean fcoe_started = false; // service lldpad was started
+global string ifcfg_file = "";
// Settings: Define all variables needed for configuration of fcoe-client
@@ -286,11 +288,12 @@
global string GetVlanInterface( string interface )
{
string vlan_interface = "";
-
+ map output = $[];
+
// check whether there is a VLAN interface which is configured for FCoE
string cmd_fcoe = sformat( "LANG=POSIX fipvlan %1", interface );
y2milestone( "Executing command: %1", cmd_fcoe );
- map output = (map)SCR::Execute( .target.bash_output, cmd_fcoe );
+ output = (map)SCR::Execute( .target.bash_output, cmd_fcoe );
y2milestone( "Output: %1", output );
list <string> lines = splitstring( output["stdout"]:"", "\n" );
@@ -298,9 +301,9 @@
// check whether there is a line for the given interface, e.g.
// eth3 | 200 | 00:0d:ec:a2:ef:00\n
// and extract name/number of VLAN channel.
- if ( regexpmatch( line, sformat( "^%1", interface) ) )
+ if ( String::StartsWith( line, interface ) )
{
- line = deletechars( line, " " );
+ line = deletechars( line, " \t" );
vlan_interface = substring( line, findfirstof( line, "|" )+1,
findlastof( line, "|" )-findfirstof( line, "|")-1 );
y2milestone( "VLAN: %1", vlan_interface );
@@ -345,77 +348,124 @@
}
//
-// Get status of FCoE and DCB from /etc/fcoe/cfg-eth
+// Create /etc/fcoe/cfg-<if> or /etc/fcoe/cfg-<if>.<vlan>
+// (depending on AUTO_VLAN setting)
//
-global map GetFCoEStatus( string vlan_device_name )
+global void CreateFcoeConfig( string vlan_device_name, map netcard )
{
- map status_map = $[];
- string content = "";
+ string file_name = "";
+ boolean file_exists = false;
- if ( vlan_device_name != "")
+ // if AUTO_VLAN is set to "yes"
+ if ( netcard["auto_vlan"]:"no" == "yes" )
{
- // fcoemon reads values from /etc/fcoe/cfg-<vlan-interface>
- string file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name );
- y2milestone( "VLAN channel %1 found, reading %2", vlan_device_name, file_name );
- content = (string)SCR::Read(.target.string, file_name);
-
- if ( content == "" || content == nil )
- {
- y2milestone( "Cannot read cfg-file - creating %1 with default values from /etc/fcoe/cfg-ethx",
- file_name );
- string def_values = (string)SCR::Read( .target.string, "/etc/fcoe/cfg-ethx" );
+ // set file name to cfg-<interface>, e.g. /etc/fcoe/eth3
+ file_name = sformat( "/etc/fcoe/cfg-%1", netcard["dev_name"]:"" );
+ }
+ else
+ {
+ // set file name to cfg-, e.g. /etc/fcoe/eth3.200
+ file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name );
+ }
+
+ // read default values
+ string content = (string)SCR::Read( .target.string, "/etc/fcoe/cfg-ethx" );
- if ( def_values != "" && def_values != nil )
- {
- boolean ret = SCR::Write( .target.string, file_name, def_values );
- if ( ret == true )
+ // and prepare content
+ if ( content != "" && content != nil )
+ {
+ list <string> lines = (list<string>)splitstring( content, "\n" );
+ lines = maplist( string line, lines, {
+ if ( !String::StartsWith( line, "#" ) ) line = deletechars( line, " \t" );
+
+ if ( String::StartsWith( line, "AUTO_VLAN" ) )
{
- list <string> lines = splitstring( def_values, "\n" );
- foreach( string line, (list<string>)lines, {
- if ( regexpmatch( line, "^FCOE_ENABLE" ) )
- {
- status_map = add( status_map, "FCOE_ENABLE", deletechars( substring(line, 12), "\"") );
- }
- if ( regexpmatch( line, "^DCB_REQUIRED" ) )
- {
- status_map = add( status_map, "DCB_REQUIRED", deletechars( substring( line, 13 ),"\"") );
- }
- });
- status_map = add( status_map, "Filename", file_name );
- AddRevertCommand( sformat( "rm %1", file_name ) );
+ return sformat( "AUTO_VLAN=\"%1\"", netcard["auto_vlan"]:"no" );
+ }
+ else if ( String::StartsWith( line, "DCB_REQUIRED" ) )
+ {
+ return sformat( "DCB_REQUIRED=\"%1\"", netcard["dcb_required"]:"no" );
+ }
+ else if ( String::StartsWith( line, "FCOE_ENABLE" ) )
+ {
+ return sformat( "FCOE_ENABLE=\"%1\"", netcard["fcoe_enable"]:"yes" );
}
else
{
- y2error( "Cannot create %1", file_name );
+ return line;
}
- }
- else
- {
- y2error( "Cannot read /etc/fcoe/cfg-ethx" );
- }
- return status_map;
+ });
+ content = mergestring( lines, "\n" );
+ y2milestone( "Writing content: %1", content );
+
+ file_exists = SCR::Write( .target.string, file_name, content );
+
+ if ( file_exists )
+ {
+ AddRevertCommand( sformat( "rm %1", file_name ) );
}
else
{
- y2milestone( "Content: %1", content );
+ y2error( "Cannot create %1", file_name );
}
-
+ }
+ else
+ {
+ y2error( "Cannot read /etc/fcoe/cfg-ethx" );
+ }
+}
+
+//
+// Get status of FCoE config from /etc/fcoe/cfg-<if>.<vlan> or /etc/fcoe/cfg-<if>
+//
+global map GetFcoeStatus( string vlan_device_name, map netcard )
+{
+ map status_map = $[];
+ string content = "";
+ boolean file_exists = false;
+ string file_name = "";
+
+ if ( vlan_device_name == "" )
+ {
+ y2error( "Interface not valid" );
+ return $[];
+ }
+
+ y2milestone( "VLAN channel %1 found", vlan_device_name );
+
+ file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name );
+ y2milestone( "Reading %1", file_name );
+ content = (string)SCR::Read(.target.string, file_name);
+
+ if ( content == "" || content == nil )
+ {
+ // try to read /etc/fcoe/cfg-<interface> (interface was automatically created)
+ file_name = sformat( "/etc/fcoe/cfg-%1", netcard["dev_name"]:"" );
+ y2milestone( "Reading %1", file_name );
+ content = (string)SCR::Read(.target.string, file_name);
+ }
+
+ if ( content != "" )
+ {
list <string> lines = splitstring( content, "\n" );
foreach( string line, (list<string>)lines, {
- if ( regexpmatch( line, "^FCOE_ENABLE" ) )
- {
- status_map = add( status_map, "FCOE_ENABLE", deletechars( substring(line, 12), "\"") );
- }
- if ( regexpmatch( line, "^DCB_REQUIRED" ) )
- {
- status_map = add( status_map, "DCB_REQUIRED", deletechars( substring( line, 13 ),"\"") );
- }
+ line = deletechars( line, " \t" );
+ foreach( string var, ["FCOE_ENABLE", "DCB_REQUIRED", "AUTO_VLAN"], {
+ if ( String::StartsWith(line, var) )
+ {
+ status_map = add( status_map, var,
+ deletechars( substring(line, size(var) + 1), "\"") );
+ }
+ });
+
});
status_map = add( status_map, "Filename", file_name );
+ y2milestone( "Returning: %1", status_map );
}
else
{
- y2error( "Interface not valid" );
+ y2warning( "Cannot read /etc/fcoe/%1", file_name );
+ Popup::Warning( sformat(_("Cannot read /etc/fcoe/cfg-file for %1"), vlan_device_name) );
}
return status_map;
@@ -441,7 +491,7 @@
{
list <string> lines = splitstring( output["stdout"]:"", "\n" );
foreach( string line, (list<string>)lines, {
- if ( regexpmatch( line, "^Status" ) )
+ if ( String::StartsWith( line, "Status" ) )
{
// Status: Failed interface not DCB capable
// Status: Successful
@@ -457,7 +507,6 @@
else
{
y2error( "Exit code: %1 Error: %2", output["exit"]:255, output["stderr"]:"" );
- // if ( output["stderr"]:"" != "" ) Popup::Error ( output["stderr"]:"" );
}
return ret;
@@ -468,17 +517,17 @@
//
global void AdjustStartStatus( )
{
- y2milestone( "Setting start of /etc/init.d/fcoe to %1", service_start["fcoe"]:false );
+ y2milestone( "Setting start of /etc/init.d/boot.fcoe to %1", service_start["fcoe"]:false );
if ( service_start["fcoe"]:false == true )
- Service::Enable("fcoe");
+ Service::Enable("boot.fcoe");
else
- Service::Disable("open-fcoe");
+ Service::Disable("boot.fcoe");
y2milestone( "Setting start of /etc/init.d/lldpad to %1", service_start["lldpad"]:false );
if ( service_start["lldpad"]:false == true )
- Service::Enable("lldpad");
+ Service::Enable("boot.lldpad");
else
- Service::Disable("lldpad");
+ Service::Disable("boot.lldpad");
}
@@ -495,11 +544,11 @@
{
boolean status = false;
- status = Service::Enabled( "fcoe" );
+ status = Service::Enabled( "boot.fcoe" );
y2milestone( "Start status of fcoe: %1", status );
service_start = add( service_start, "fcoe", status );
- status = Service::Enabled( "lldpad" );
+ status = Service::Enabled( "boot.lldpad" );
y2milestone( "Start status of lldpad: %1", status );
service_start = add( service_start, "lldpad", status );
}
@@ -518,19 +567,19 @@
// see /etc/init.d/fcoe, line 85 (modprobe fcoe > /dev/null 2>&1)
boolean ret = true;
- if ( Service::Status( "fcoe" ) != 0 )
+ if ( Service::Status( "boot.fcoe" ) != 0 )
{
- boolean success = Service::Start( "fcoe" );
+ boolean success = Service::Start( "boot.fcoe" );
if ( success )
{
- y2milestone( "FCoE started (/etc/init.d/fcoe start)");
+ y2milestone( "FCoE started (/etc/init.d/boot.fcoe start)");
fcoe_started = true;;
}
else
{
- y2error( "Cannot start FCoE service - '/etc/init.d/fcoe start' failed" );
+ y2error( "Cannot start FCoE service - '/etc/init.d/boot.fcoe start' failed" );
Popup::Error( "Cannot start FCoE service.
-'/etc/init.d/fcoe start' failed" );
+'/etc/init.d/boot.fcoe start' failed" );
ret = false;
}
}
@@ -539,19 +588,19 @@
y2milestone( "FCoE service is running");
}
- if ( Service::Status( "lldpad" ) != 0 )
+ if ( Service::Status( "boot.lldpad" ) != 0 )
{
- boolean success = Service::Start( "lldpad" );
+ boolean success = Service::Start( "boot.lldpad" );
if ( success )
{
- y2milestone( "Lldpad started (/etc/init.d/lldpad start)");
+ y2milestone( "Lldpad started (/etc/init.d/boot.lldpad start)");
lldpad_started = true;
}
else
{
- y2error( "Cannot start service lldpad - '/etc/init.d/lldpad start' failed" );
+ y2error( "Cannot start service lldpad - '/etc/init.d/boot.lldpad start' failed" );
Popup::Error( "Cannot start service lldpad.
-'/etc/init.d/lldpad start' failed" );
+'/etc/init.d/boot.lldpad start' failed" );
ret = false;
}
}
@@ -563,8 +612,8 @@
}
//
-// dev_name device fcoe_vlan fcoe_enable dcb_required dcb_capable vlan_interface cfg_file
-// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no 200 /etc/fcoe/cfg-eth3.200
+// dev_name device fcoe_vlan fcoe_enable dcb_required auto_vlan dcb_capable vlan_interface cfg_file
+// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no yes/no 200 /etc/fcoe/cfg-eth3.200
//
// Detect network interface cards (hardware probe) and get status
//
@@ -579,20 +628,39 @@
if ( netcards == [] || netcards == nil )
return false;
-
+
foreach ( map card, netcards, {
+ // get first state map from link list in resource map
+ map state_map = card["resource", "link", 0 ]:$[];
+
+ if ( state_map["state"]:false == false )
+ {
+ // call 'ifconfig <interface> up' here because it's not yet
+ // clear who configures the interfaces (fipvlan command itself?)
+ // -> see bnc #705171 (this applies also to installed system)
+ string cmd_ifup = sformat( "ifconfig %1 up", card["dev_name"]:"" );
+ y2milestone( "Executing command: %1", cmd_ifup );
+ SCR::Execute( .target.bash_output, cmd_ifup );
+
+ // ifconfig up always returns 0 -> no error message can be made
+ }
+ } );
+ // call .probe.netcard again
+ netcards = (list<map>)SCR::Read(.probe.netcard);
+
+ foreach ( map card, netcards, {
+ map state_map = card["resource", "link", 0]:$[];
map info_map = $[];
map status_map = $[];
- // It's not possible to distinguish between no cable attached
- // and interface not up in 'link' map got from .probe.network
- // (according to snwint), so we have to check every interface.
- // This may take a while!
- vlan_interface = GetVlanInterface( card["dev_name"]:"" );
-
+ // only call fipvlan <interface> for configured interfaces
+ if ( state_map["state"]:false == true )
+ {
+ vlan_interface = GetVlanInterface( card["dev_name"]:"" );
+ }
if ( vlan_interface == "" )
{
- // FCoE isn't enabled on the switch - we can't do anything here.
+ // Interface down or FCoE not enabled on the switch - we can't do anything here.
fcoe_vlan_interface = NOT_AVAILABLE;
}
else
@@ -601,24 +669,41 @@
if ( fcoe_vlan_interface != "" )
{
- status_map = GetFCoEStatus( fcoe_vlan_interface );
+ status_map = GetFcoeStatus( fcoe_vlan_interface, card );
}
else
{
- // FCoE VLAN interface not yet configured
+ // FCoE VLAN interface not yet configured (status_map remains empty)
fcoe_vlan_interface = NOT_CONFIGURED;
}
}
dcb_capable = DCBCapable( card["dev_name"]:"" );
info_map = add( info_map, "dev_name", card["dev_name"]:""); // network card, e.g. eth3
- info_map = add( info_map, "device", card["device"]:""); // description
+ if ( card["device"]:"" != "" )
+ {
+ info_map = add( info_map, "device", card["device"]:""); // device name
+ }
+ else
+ {
+ info_map = add( info_map, "device", card["model"]:""); // model
+ }
+
info_map = add( info_map, "fcoe_vlan", fcoe_vlan_interface ); // FCoE VLAN interface, e.g. eth3.200
- info_map = add( info_map, "fcoe_enable", status_map["FCOE_ENABLE"]:""); // FCOE_ENABLE
- info_map = add( info_map, "dcb_required", status_map["DCB_REQUIRED"]:""); // DCB_REQUIRED
- info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable
- info_map = add( info_map, "vlan_interface", vlan_interface ); // VLAN interface, e.g. 200
- info_map = add( info_map, "cfg_file", status_map["Filename"]:"" ); // cfg file name, e.g. /etc/fcoe/cfg-eth3.200
+
+ if ( fcoe_vlan_interface != NOT_AVAILABLE )
+ {
+ // default for FCoE enable is yes
+ info_map = add( info_map, "fcoe_enable", status_map["FCOE_ENABLE"]:"yes" ); // FCOE_ENABLE
+ // default for DCB required is yes unless the interface is not dcb capable
+ info_map = add( info_map, "dcb_required", status_map["DCB_REQUIRED"]:( (dcb_capable=="yes")?"yes":"no" ) );
+ // default is to create /etc/fcoe/cfg-ethx file with VLAN device in name
+ // (e.g. cfg-eth3.200), set AUTO_VLAN to "no" then (see bnc #692403)
+ info_map = add( info_map, "auto_vlan", status_map["AUTO_VLAN"]:"no"); // AUTO_VLAN
+ }
+ info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable
+ info_map = add( info_map, "vlan_interface", vlan_interface ); // VLAN interface, e.g. 200
+ info_map = add( info_map, "cfg_file", status_map["Filename"]:"" ); // cfg file name, e.g. /etc/fcoe/cfg-eth3.200
network_interfaces = add( network_interfaces, info_map );
} );
@@ -635,7 +720,7 @@
global boolean ReadFcoeConfig()
{
list <string> options = (list<string>) SCR::Dir(.fcoe);
- y2milestone( "List of options: %1", options );
+ y2milestone( "List of options in /etc/fcoe/config: %1", options );
if ( options == [] || options == nil )
return false;
@@ -646,7 +731,7 @@
string syslog_val = (string)SCR::Read(add(.fcoe, "USE_SYSLOG"));
fcoe_general_config = add( fcoe_general_config, "USE_SYSLOG", syslog_val );
- y2milestone( "/etc/fcoe/config read - DEBUG: %1, USE_SYSLOG: %2", debug_val, syslog_val );
+ y2milestone( "/etc/fcoe/config read: DEBUG: %1, USE_SYSLOG: %2", debug_val, syslog_val );
return true;
}
@@ -679,6 +764,9 @@
{
list <map> netcards = GetNetworkCards();
boolean success = true;
+ string command = "";
+ map output = $[];
+
y2milestone( "Writing /etc/fcoe/cfg-ethx files" );
foreach ( map card, (list<map>)netcards, {
@@ -690,14 +778,20 @@
list <string> lines = (list<string>)splitstring( content, "\n" );
lines = maplist( string line, lines, {
- if ( regexpmatch( line, "^FCOE_ENABLE" ) )
+ if ( !String::StartsWith( line, "#" ) ) line = deletechars( line, " \t" );
+
+ if ( String::StartsWith( line, "FCOE_ENABLE" ) )
{
return sformat( "FCOE_ENABLE=\"%1\"", card["fcoe_enable"]:"no" );
}
- else if ( regexpmatch( line, "^DCB_REQUIRED" ) )
+ else if ( String::StartsWith( line, "DCB_REQUIRED" ) )
{
return sformat( "DCB_REQUIRED=\"%1\"", card["dcb_required"]:"no" );
}
+ else if ( String::StartsWith( line, "AUTO_VLAN" ) )
+ {
+ return sformat( "AUTO_VLAN=\"%1\"", card["auto_vlan"]:"no" );
+ }
else
{
return line;
@@ -716,6 +810,20 @@
{
y2milestone( "%1 written", card["cfg_file"]:"" );
}
+ // enable DCB app fcoe (app:0)
+ if ( card["dcb_required"]:"no" == "yes" )
+ {
+ command = sformat( "dcbtool sc %1 app:0 e:1 a:1 w:1", card["dev_name"]:"" );
+ y2milestone( "Executing command: %1", command );
+
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+ if ( output["exit"]:255 != 0 )
+ {
+ Popup::Error( sformat( _("Command: %1 failed"), command ) );
+ y2error( "Command: %1 failed", command);
+ }
+ }
}
} );
@@ -728,7 +836,7 @@
if ( FcoeClient::Modified() )
{
y2milestone( "Restarting fcoe");
- ret = Service::Restart("fcoe");
+ ret = Service::Restart("boot.fcoe");
}
return ret;
}
@@ -774,8 +882,8 @@
""
);
- // check if network services are running
- if(!NetworkService::RunningNetworkPopup()) return false;
+ // a check for running network services doesn't make sense (is not needed), the
+ // interfaces are set up in FcoeClient::GetVlanInterfaces()
if(PollAbort()) return false;
Progress::NextStage();
Modified: trunk/fcoe-client/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/complex.ycp?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/complex.ycp (original)
+++ trunk/fcoe-client/src/complex.ycp Thu Sep 22 13:58:38 2011
@@ -51,14 +51,16 @@
* @return true if users aborts installation
*/
boolean ReallyAbort() {
+ y2milestone( "Aborting FCoE configuration" );
+
// revert start of 'fcoe' or 'lldpad'
if ( FcoeClient::fcoe_started )
{
- Service::Stop( "fcoe" );
+ Service::Stop( "boot.fcoe" );
}
if ( FcoeClient::lldpad_started )
{
- Service::Stop( "lldpad" );
+ Service::Stop( "boot.lldpad" );
}
if ( !FcoeClient::Modified() )
@@ -112,14 +114,12 @@
return ret ? `next : `abort;
}
-// TODO - check whether a 'validate' is required
-
/**
* Init
**/
void InitServicesDialog (string id) {
y2milestone( "Init services dialog" );
- y2milestone( "Modified: %1", FcoeClient::Modified() );
+ y2milestone( "Data modified: %1", FcoeClient::Modified() );
map status_map = FcoeClient::GetStartStatus();
if ( status_map["fcoe"]:false == true )
@@ -155,18 +155,21 @@
// check VLAN status
if ( card["fcoe_vlan"]:"" == FcoeClient::NOT_CONFIGURED )
{
- UI::ChangeWidget( `id(`edit), `Enabled, false );
+ UI::ChangeWidget( `id(`edit), `Enabled, true );
UI::ChangeWidget( `id(`create), `Enabled, true );
+ UI::ChangeWidget( `id(`remove), `Enabled, false );
}
else if ( card["fcoe_vlan"]:"" == FcoeClient::NOT_AVAILABLE )
{
UI::ChangeWidget( `id(`edit), `Enabled, false );
- UI::ChangeWidget( `id(`create), `Enabled, false );
+ UI::ChangeWidget( `id(`create), `Enabled, false );
+ UI::ChangeWidget( `id(`remove), `Enabled, false );
}
else
{
UI::ChangeWidget( `id(`edit), `Enabled, true );
UI::ChangeWidget( `id(`create), `Enabled, false );
+ UI::ChangeWidget( `id(`remove), `Enabled, true );
}
}
@@ -184,7 +187,7 @@
foreach ( map card, (list<map>)netcards, {
table_items = add( table_items,
`item(`id(row), card["dev_name"]:"", card["device"]:"", card["fcoe_vlan"]:"",
- card["fcoe_enable"]:"", card["dcb_required"]:"", card["dcb_capable"]:"" )
+ card["fcoe_enable"]:"", card["dcb_required"]:"", card["auto_vlan"]:"", card["dcb_capable"]:"" )
);
row = row + 1;
});
@@ -232,6 +235,8 @@
// set values for 'FCoE Enabled' and 'DCB Required'
UI::ChangeWidget( `id(`fcoe), `Value, card["fcoe_enable"]:"" );
UI::ChangeWidget( `id(`dcb), `Value, card["dcb_required"]:"" );
+ UI::ChangeWidget( `id(`auto), `Value, card["auto_vlan"]:"" );
+ // 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"]:"" ) );
}
@@ -262,6 +267,14 @@
}
else if ( action == `create )
{
+ // haendel:~/:[0]# fipvlan -c -s eth3
+ // Fibre Channel Forwarders Discovered
+ // interface | VLAN | FCF MAC
+ // ------------------------------------------
+ // eth3 | 200 | 00:0d:ec:a2:ef:00
+ // Created VLAN device eth3.200
+ // Starting FCoE on interface eth3.200
+
map card = FcoeClient::GetCurrentNetworkCard();
string dev_name = card["dev_name"]:"";
@@ -270,10 +283,11 @@
string vlan_interface = "";
string fcoe_vlan_interface = "";
map status_map = $[];
- boolean create_ifcfg = false;
- string ifcfg_file = "";
+ boolean create_ifcfg = true;
+
+ FcoeClient::ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1\.%2", dev_name, card["vlan_interface"]:"" );
- if ( Stage::initial() ) // first stage - create and start FCoE VLAN interface
+ if ( Stage::initial() ) // first stage of installation - create and start FCoE VLAN interface
{
// headline of a popup: creating and starting Fibre Channel over Ethernet
boolean ret = Popup::YesNoHeadline( _("Creating and starting FCoE on detected VLAN device"),
@@ -312,11 +326,9 @@
on discovered FCoE VLAN interface on %1?"), dev_name ) );
if ( ret == true )
{
- ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1\.%2", dev_name, card["vlan_interface"]:"" );
-
// if /etc/sysconfig/network/ifcfg-<vlan-interface> already exists
// call 'ifup' for the interface (creates /proc/net/vlan/<vlan-interface>)
- if ( FileUtils::Exists( ifcfg_file ) )
+ if ( FileUtils::Exists( FcoeClient::ifcfg_file ) )
{
command = sformat( "ifup %1\.%2", dev_name, card["vlan_interface"]:"" );
y2milestone( "Executing command: %1", command );
@@ -331,13 +343,11 @@
else
{
command = sformat( "fipvlan -c -s %1", dev_name ); // create and start FCoE
- // create_ifcfg = true;
}
}
else
{
command = sformat( "fipvlan -c -s %1", dev_name );
- // create_ifcfg = true;
}
y2milestone( "Executing command: %1", command );
@@ -370,19 +380,19 @@
if ( fcoe_vlan_interface != "" )
{
y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface );
- status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface );
-
- // store command to be able to revert the creation of FCoE VLAN interface in case of abort
- // TODO: is this also OK if only 'fipvlan -s <interface>' is called?
+ FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card );
+ status_map = FcoeClient::GetFcoeStatus ( fcoe_vlan_interface, card );
+ // store command to be able to revert the creation of FCoE VLAN interface in case of 'Abort'
+ // (also if only 'fipvlan -s <interface>' is called)
FcoeClient::AddRevertCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) );
if ( create_ifcfg )
{
- string config = sformat( "BOOTPROTO=\"static\"\nSTARTMODE=\"onboot\"
-ETHERDEVICE=\"%1\"\nUSERCONTROL=\"no\"\nINTERFACETYPE=\"vlan\"\n", dev_name );
- ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1", fcoe_vlan_interface );
- SCR::Write(.target.string, ifcfg_file, config);
- y2milestone( "Writing config: %1 to %2", config, ifcfg_file );
- FcoeClient::AddRevertCommand( sformat( "rm %1", ifcfg_file ) );
+ string config = sformat( "BOOTPROTO=\"static\"\nSTARTMODE=\"nfsroot\"
+ETHERDEVICE=\"%1\"\nUSERCONTROL=\"no\"\n", dev_name );
+ FcoeClient::ifcfg_file = sformat( "/etc/sysconfig/network/ifcfg-%1", fcoe_vlan_interface );
+ SCR::Write(.target.string, FcoeClient::ifcfg_file, config);
+ y2milestone( "Writing config: %1 to %2", config, FcoeClient::ifcfg_file );
+ FcoeClient::AddRevertCommand( sformat( "rm %1", FcoeClient::ifcfg_file ) );
}
}
else
@@ -395,6 +405,7 @@
card["fcoe_vlan"] = fcoe_vlan_interface;
card["fcoe_enable"] = status_map["FCOE_ENABLE"]:"";
card["dcb_required"] = status_map["DCB_REQUIRED"]:"";
+ card["auto_vlan"] = status_map["AUTO_VLAN"]:"";
card["cfg_file"] = status_map["Filename"]:"";
FcoeClient::SetModified( true );
@@ -405,8 +416,73 @@
UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), fcoe_vlan_interface );
UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 3), status_map["FCOE_ENABLE"]:"" );
UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), status_map["DCB_REQUIRED"]:"" );
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), status_map["AUTO_VLAN"]:"" );
AdjustButtons();
}
+ else if ( action == `remove )
+ {
+ map card = FcoeClient::GetCurrentNetworkCard();
+ map output = $[];
+ string command = "";
+ // popup text: really remove FCoE VLAN interface
+ string popup_text = sformat( _("Do you really want to remove the FCoE VLAN device %1?"),
+ card["fcoe_vlan"]:"" );
+
+ if ( !Stage::initial() )
+ {
+ // popup text continues
+ popup_text = popup_text + "\n" + _( "Please note: The device won't be restored on 'Cancel'." );
+ }
+
+ // headline of a popup
+ boolean ret = Popup::YesNoHeadline( _("Removing FCoE VLAN device"),
+ popup_text );
+
+ if ( ret == true )
+ {
+ y2milestone( "Removing %1", card["fcoe_vlan"]:"" );
+
+ command = sformat( "vconfig rem %1", card["fcoe_vlan"]:"") ;
+ y2milestone( "Calling %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+
+ if ( output["exit"]:255 == 0 )
+ {
+ command = sformat( "rm %1", card["cfg_file"]:"" );
+ y2milestone( "Calling %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+ command = sformat( "rm /etc/sysconfig/network/ifcfg-%1", card["fcoe_vlan"]:"" );
+ y2milestone( "Calling %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+
+ // set new values in global map network_interfaces
+ card["fcoe_vlan"] = FcoeClient::NOT_CONFIGURED;
+ card["fcoe_enable"] = "";
+ card["dcb_required"] = "";
+ card["auto_vlan"] = "";
+ card["cfg_file"] = "";
+ FcoeClient::SetModified( true );
+
+ FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card );
+ y2milestone( "Current network interfaces: %1", FcoeClient::GetNetworkCards() );
+
+ // replace values in table
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), card["fcoe_vlan"]:"" );
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 3), card["fcoe_enable"]:"" );
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), card["dcb_required"]:"" );
+ UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), card["auto_vlan"]:"" );
+ AdjustButtons();
+ }
+ else
+ {
+ Popup::Error( sformat( _("Removing of interface %1 failed"), card["fcoe_vlan"]:"") );
+ y2error( "Removing of interface %1 failed", card["fcoe_vlan"]:"" );
+ }
+ }
+ }
return nil;
}
@@ -420,7 +496,19 @@
symbol HandleEditDialog( string id, map event )
{
any action = event["ID"]:nil;
- return nil;
+ map card = FcoeClient::GetCurrentNetworkCard();
+
+ if ( action == `dcb )
+ {
+ string dcb_required = (string)UI::QueryWidget( `id(`dcb), `Value );
+ if ( dcb_required == "yes" && card["dcb_capable"]:"" != "yes" )
+ {
+ // text of a warning popup
+ Popup::Warning( _("DCB Required is set to \"yes\" but the
+interface isn't DCB capable") );
+ y2warning( "DCB_REQUIRED is set to yes but the interface isn't DCB capable" );
+ }
+ }
}
/**
@@ -430,21 +518,16 @@
void StoreServicesDialog (string id, map event)
{
y2milestone( "Store services dialog" );
- boolean fcoe_auto = (boolean)UI::QueryWidget( `id ("fcoe_startup_auto"), `Value );
- if ( fcoe_auto )
- {
- FcoeClient::SetStartStatus( "fcoe", true );
- y2milestone( "Setting auto start of FCoE to true");
- }
+ boolean fcoe_auto = (boolean)UI::QueryWidget( `id ("fcoe_startup_auto"), `Value );
+ FcoeClient::SetStartStatus( "fcoe", fcoe_auto );
+ y2milestone ("Setting auto start of service 'fcoe' to: %1", fcoe_auto );
+
boolean lldpad_auto = (boolean)UI::QueryWidget( `id ("lldpad_startup_auto"), `Value );
- if ( lldpad_auto )
- {
- FcoeClient::SetStartStatus( "lldpad", true );
- y2milestone( "Setting auto start of lldpad to true");
- }
+ FcoeClient::SetStartStatus( "lldpad", lldpad_auto );
+ y2milestone( "Setting auto start of service 'lldpad' to: %1", lldpad_auto );
}
void StoreInterfacesDialog (string id, map event)
@@ -493,6 +576,13 @@
FcoeClient::SetModified( true );
}
+ string auto_vlan = (string)UI::QueryWidget( `id(`auto), `Value );
+ if ( card["auto_vlan"]:"" != auto_vlan )
+ {
+ card["auto_vlan"] = auto_vlan;
+ FcoeClient::SetModified( true );
+ }
+
FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card );
y2milestone( "Current data: %1", FcoeClient::GetNetworkCards() );
Modified: trunk/fcoe-client/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/dialogs.ycp?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/dialogs.ycp (original)
+++ trunk/fcoe-client/src/dialogs.ycp Thu Sep 22 13:58:38 2011
@@ -64,23 +64,29 @@
return `VBox(
`VStretch(),
// heading is replaced later (InitEditDialog)
- `Label( `id(`heading), ("Configuration of Interface ...................") ),
+ `Label( `id(`heading), ("Configuration of Interface .......................") ),
+ `VSpacing(2),
`HBox (
`HStretch(),
`Frame( (""),
- `VBox(
- `VSpacing(2),
- `ComboBox( `id(`fcoe), _("FCoE Enable"),
- [`item(`id("yes"), "yes" ),
- `item(`id("no"), "no", true ) ]
- ),
- `VSpacing (2),
- `ComboBox( `id(`dcb), _("DCB Required"),
- [`item(`id("yes"), "yes" ),
- `item(`id("no"), "no", true ) ]
- ),
- `VSpacing (2)
- )
+ `MarginBox( 10, 2,
+ `VBox(
+ `ComboBox( `id(`fcoe), _("FCoE Enable"),
+ [`item(`id("yes"), "yes" ),
+ `item(`id("no"), "no", true ) ]
+ ),
+ `VSpacing (1),
+ `ComboBox( `id(`dcb), `opt (`notify, `immediate), _("DCB Required"),
+ [`item(`id("yes"), "yes" ),
+ `item(`id("no"), "no", true ) ]
+ ),
+ `VSpacing (1),
+ `ComboBox( `id(`auto), _("AUTO_VLAN"),
+ [`item(`id("yes"), "yes" ),
+ `item(`id("no"), "no", true ) ]
+ )
+ )
+ )
),
`HStretch()
),
@@ -98,11 +104,12 @@
return `MarginBox( mbox_x, mbox_y,
`VBox (
`VSpacing(2.0),
- // frame
+ // frame containing radio buttons for fcoe service start
`Frame (_("FCoE Service Start"),
`VBox (`RadioButtonGroup (`id ("fcoe_service_startup"), items_fcoe))
),
`VStretch(),
+ // frame containing radio buttons for lldpad service start
`Frame (_("Lldpad Service Start"),
`VBox (`RadioButtonGroup (`id ("lldpad_service_startup"), items_lldpad))
),
@@ -119,12 +126,16 @@
return `MarginBox( mbox_x, mbox_y,
`VBox(
`Table(`id(`interfaces), `opt(`notify, `immediate, `keepSorting ),
+ // column headers of a table with network interfaces (keep them short)
`header(_("Device Name"), _("Model"), _("FCoE VLAN Interface"),
- _("FCoE Enable"), _("DCB Required"), _("DCB capable") ),
+ // continue column headers
+ _("FCoE Enable"), _("DCB Required"), _("AUTO VLAN"), _("DCB capable") ),
[]
),
- `Left(`HBox( `PushButton(`id(`edit), _("Change &Settings") ),
- `PushButton(`id(`create), _("Create FCoE &VLAN Interface")) )
+ // button labels
+ `Left(`HBox( `PushButton(`id(`edit), _("Change &Settings")),
+ `PushButton(`id(`create), _("Create FCoE &VLAN Interface")),
+ `PushButton(`id(`remove), _("&Remove Interface")) )
)
)
);
@@ -148,6 +159,7 @@
`item(`id("no"), "no", true )
])
),
+ // ComboBox label
`Left(`ComboBox(`id("syslog"), _("&Use syslog"),
[`item(`id("yes"), "yes", true ),
`item(`id("no"), "no" )
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=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/fcoe-client_auto.ycp (original)
+++ trunk/fcoe-client/src/fcoe-client_auto.ycp Thu Sep 22 13:58:38 2011
@@ -203,8 +203,9 @@
if ( fcoe_vlan_interface != "" )
{
y2milestone( "FCoE VLAN interface %1 created/started", fcoe_vlan_interface );
- // read or create /etc/fcoe/ethx file
- status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface );
+ // create /etc/fcoe/ethx file and get values
+ FcoeClient::CreateFcoeConfig( fcoe_vlan_interface, card );
+ status_map = FcoeClient::GetFcoeStatus( fcoe_vlan_interface, card );
// apply modified data
detected_netcards[ index, "fcoe_vlan"] = fcoe_vlan_interface;
detected_netcards[ index, "cfg_file"] = status_map["Filename"]:"";
Modified: trunk/fcoe-client/src/fcoe-client_finish.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/fcoe-client_finish.ycp?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/fcoe-client_finish.ycp (original)
+++ trunk/fcoe-client/src/fcoe-client_finish.ycp Thu Sep 22 13:58:38 2011
@@ -47,10 +47,19 @@
else if (func == "Write")
{
boolean start_services = false;
+ string command = "";
+ y2milestone( "Copying files /etc/fcoe/* to destination" );
// copy fcoe config files to destdir
WFM::Execute (.local.bash,"test -d /etc/fcoe/ && mkdir -p '" + String::Quote(Installation::destdir) + "/etc/fcoe' && cp -a /etc/fcoe/* '" + String::Quote(Installation::destdir) + "/etc/fcoe/'");
+ // copy sysconfig file
+ command = sformat ( "cp -a %1 '%2/etc/sysconfig/network'", FcoeClient::ifcfg_file,
+ String::Quote(Installation::destdir) );
+ y2milestone( "Executing command: %1", command );
+
+ WFM::Execute (.local.bash, command );
+
// only enable services if any FCoE VLAN interface is enabled
list <map> netcards = FcoeClient::GetNetworkCards();
@@ -66,8 +75,8 @@
if ( start_services )
{
y2milestone( "Enabling service start of fcoe and lldpad" );
- Service::Enable("fcoe");
- Service::Enable("lldpad");
+ Service::Enable("boot.fcoe");
+ Service::Enable("boot.lldpad");
}
}
else
Modified: trunk/fcoe-client/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/helps.ycp?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/helps.ycp (original)
+++ trunk/fcoe-client/src/helps.ycp Thu Sep 22 13:58:38 2011
@@ -75,26 +75,29 @@
the configuration opens.</p>
"),
- /* Services dialog help 1/2 */
+ /* Services dialog help 1/3 */
"services" : _("<p><b><big>Starting of services</big><br></b><br>
-There is the possibility to enable/disable the start of the services
-<b>fcoe</b> and <b>lldpad</b> at boot time.<br></p>
+There is the possibility to enable or disable the start of the services
+<b>fcoe</b> and <b>lldpad</b> at boot time.</p>
") +
+ /* Services dialog help 2/3 */
+ _("<p>Starting the service <b>fcoe</b> means starting the <i>Fibre Channel over
+Ethernet</i> service daemon <i>fcoemon</i> which controls the FCoE interfaces and
+establishes a connection with the daemon <i>lldpad</i>.</p>" ) +
- /* Services dialog help 2/2 */
-_("<p>Check the appropriate button, e.g. if you want to start FCoE automatically at
-boot time click on 'When booting' in 'FcoE' frame.</p>"),
-
+ /* Services dialog help 3/3 */
+ _("<p>The <b>lldpad</b> service provides the <i>Link Layer Discovery Protocol</i> agent daemon <i>lldpad</i> which informs <i>fcoemon</i> about DCB (Data Center Bridging) features and configuration of the interfaces.</p>"),
+
/* Interfaces dialog help 1/4 */
"interfaces" : _("<p><b><big>Network interface overview</big></b><br></p>") +
/* Interfaces dialog help 2/4 */
-_("<p>The interfaces dialog shows all detected netcards including the status of VLAN and FCoE configuration.<br>FCoE is possible if a VLAN interface is configured for FCoE on the switch. For every netcard (network interface) this is shown in column 'FCoE VLAN interface'.</p>") +
+_("<p>The interfaces dialog shows all detected netcards including the status of VLAN and FCoE configuration.<br>FCoE is possible if a VLAN interface is configured for FCoE on the switch. For every netcard (network interface) this is shown in column <i>FCoE VLAN Interface</i>.</p>") +
/* Interfaces dialog help 3/4 */
_("<p>The values for <i>FCoE VLAN Interface</i> in detail:<br>
-<i>not available</i> means, FCoE isn't possible (must be enabled on the switch first)<br>
-<i>not configured</i>: FCoE is possible but not yet activated, press <b>Create FCoE VLAN Interface</b> to do this.<br>
+<b>not available</b>: Fibre Channel over Ethernet isn't possible (must be enabled on the switch first)<br>
+<b>not configured</b>: FCoE is possible but not yet activated, press <b>Create FCoE VLAN Interface</b> to do this.<br>
If the FCoE VLAN interface is already created the name is shown in the column, e.g. eth3.200.</p>") +
/* Interfaces dialog help 3/4 */
@@ -108,21 +111,27 @@
/* Configuration dialog help 3/3 */
_("<p>The values are:<br>
-<b>Debug</b>: <i>yes</i> or <i>no</i> is used to enable debugging messages from the fcoe service script and 'fcoemon'<br>
-<b>Use syslog</b>: <i>yes</i> or <i>no</i> sends messages to the system log if set to <i>yes</i> (see /var/log/messages).</p>"),
+<b>Debug</b>: <i>yes</i> or <i>no</i><br>
+This is used to enable or disable debugging messages from the fcoe service script and <i>fcoemon</i>.<br>
+<b>Use syslog</b>: <i>yes</i> or <i>no</i><br>
+Messages are sent to the system log if set to <i>yes</i> (data are logged to /var/log/messages).</p>"),
/* edit dialog help 1/3 */
"change" : _("<p>Edit settings in /etc/fcoe/ethx</p>" ) +
/* Edit dialog help 2/3 */
- _( "<p>The daemon 'fcoemon' reads these configuration files on initialization.
+ _( "<p>The daemon <i>fcoemon</i> reads these configuration files on initialization.
There is a file for every interface and the values indicate whether FCoE instances
should be created and if DCB is required.</p>" ) +
/* Edit dialog help 3/3 */
_( "<p>The values are:<br>
- FCoE enable: <i>yes</i> or <i>no</i> Enable or disable creation of FCoE. <br>
- DCB required: <i>yes</i> or <i>no</i> The default is <i>yes</i>, DCB is usually
- required.</p>" ),
+<b>FCoE Enable</b>: <i>yes</i> or <i>no</i><br>
+Enable or disable the creation of FCoE instances.<br>
+<b>DCB Required</b>: <i>yes</i> or <i>no</i><br>
+The default is <i>yes</i>, DCB is usually required.<br>
+<b>AUTO VLAN</b>: <i>yes</i> or <i>no</i><br>
+If set to <i>yes</i> 'fcoemon' will create the VLAN
+interfaces automatically.</p>" ),
];
Modified: trunk/fcoe-client/src/inst_fcoe-client.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/inst_fcoe-client.ycp?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/inst_fcoe-client.ycp (original)
+++ trunk/fcoe-client/src/inst_fcoe-client.ycp Thu Sep 22 13:58:38 2011
@@ -41,23 +41,16 @@
// create /etc/fcoe
SCR::Execute(.target.bash, "mkdir -p /etc/fcoe" );
-// TODO: check what is additional needed
-// - load any modules ?
-//
-// FcoeClient::CheckInstalledPackages() not needed in inst-sys
-// FcoeClient::DetectStartStatus() doesn't make sense in inst-sys
-
-// check for running network
-if( !NetworkService::RunningNetworkPopup() )
-{
- y2error( "Network NOT set up" );
- return nil;
-}
+// FcoeClient::CheckInstalledPackages() not needed in inst-sys
+// FcoeClient::DetectStartStatus() doesn't make sense in inst-sys
+// NetworkService::RunningNetworkPopup() do not check for running network, the
+// interfaces are set up in FcoeClient::GetVlanInterface()
// reset global values
FcoeClient::ResetNetworkCards();
// start services fcoe and lldpad
+// (modules for fcoe are loaded in /etc/init.d/fcoe)
success = FcoeClient::ServiceStatus();
if ( !success )
{
Modified: trunk/fcoe-client/src/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/wizards.ycp?rev=65916&r1=65915&r2=65916&view=diff
==============================================================================
--- trunk/fcoe-client/src/wizards.ycp (original)
+++ trunk/fcoe-client/src/wizards.ycp Thu Sep 22 13:58:38 2011
@@ -121,10 +121,23 @@
];
map status_map = FcoeClient::GetStartStatus();
- if ( status_map["fcoe"]:false == true || status_map["lldpad"]:false == true )
- ini_tab = "interfaces";
+
+ if ( CWMTab::LastTab() == nil || CWMTab::LastTab() == "" ) // first run
+ {
+ if ( status_map["fcoe"]:false == true && status_map["lldpad"]:false == true )
+ {
+ ini_tab = "interfaces";
+ }
+ else
+ {
+ ini_tab = "services";
+ }
+ }
else
- ini_tab = "services";
+ {
+ // get correct tab to return after 'Edit'
+ ini_tab = CWMTab::LastTab();
+ }
tab_order = ["services", "interfaces", "configuration"];
}
@@ -154,7 +167,10 @@
Label::BackButton (),
Label::FinishButton()
);
- Wizard::DisableBackButton ();
+ Wizard::SetNextButton(`next, Label::OKButton());
+ Wizard::SetAbortButton(`abort, Label::CancelButton());
+ Wizard::HideBackButton();
+
// TODO: rename icon to yast2-fcoe-client (yast2-theme package)
Wizard::SetTitleIcon("fcoe");
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org