Hello community,
here is the log from the commit of package yast2-fcoe-client for openSUSE:Factory
checked in at Thu Jun 9 09:37:52 CEST 2011.
--------
--- yast2-fcoe-client/yast2-fcoe-client.changes 2011-05-19 11:39:21.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-fcoe-client/yast2-fcoe-client.changes 2011-06-07 13:33:21.000000000 +0200
@@ -1,0 +2,10 @@
+Thu May 26 14:24:19 CEST 2011 - gs@suse.de
+
+- Create VLAN interface and start FCoE during installation, only
+ start FCoE in installed system (if VLAN interface exists)
+- 'DCB capable' is last column in table of interfaces
+- inst_fcoe-client.ycp and fcoe-client_finish.ycp added (needed
+ for installation workflow)
+- V 2.21.2
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-fcoe-client-2.21.1.tar.bz2
New:
----
yast2-fcoe-client-2.21.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-fcoe-client.spec ++++++
--- /var/tmp/diff_new_pack.fj4HOl/_old 2011-06-09 09:35:35.000000000 +0200
+++ /var/tmp/diff_new_pack.fj4HOl/_new 2011-06-09 09:35:35.000000000 +0200
@@ -19,12 +19,12 @@
Name: yast2-fcoe-client
-Version: 2.21.1
+Version: 2.21.2
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-fcoe-client-2.21.1.tar.bz2
+Source0: yast2-fcoe-client-2.21.2.tar.bz2
Prefix: /usr
@@ -40,7 +40,7 @@
Ethernet (FCoE) configuration.
%prep
-%setup -n yast2-fcoe-client-2.21.1
+%setup -n yast2-fcoe-client-2.21.2
%build
%{prefix}/bin/y2tool y2autoconf
@@ -73,10 +73,10 @@
/usr/share/YaST2/include/fcoe-client/*
/usr/share/YaST2/clients/fcoe-client.ycp
/usr/share/YaST2/clients/fcoe-client_*.ycp
+/usr/share/YaST2/clients/inst_fcoe-client.ycp
/usr/share/YaST2/modules/FcoeClient.*
%{prefix}/share/applications/YaST2/fcoe-client.desktop
%dir /usr/share/YaST2/scrconf
/usr/share/YaST2/scrconf/*.scr
%doc %{prefix}/share/doc/packages/yast2-fcoe-client
-
%changelog
++++++ yast2-fcoe-client-2.21.1.tar.bz2 -> yast2-fcoe-client-2.21.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/VERSION new/yast2-fcoe-client-2.21.2/VERSION
--- old/yast2-fcoe-client-2.21.1/VERSION 2011-05-18 14:07:44.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/VERSION 2011-05-31 12:24:12.000000000 +0200
@@ -1 +1 @@
-2.21.1
+2.21.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/configure new/yast2-fcoe-client-2.21.2/configure
--- old/yast2-fcoe-client-2.21.1/configure 2011-05-19 11:31:41.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/configure 2011-05-31 12:25:13.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2-fcoe-client 2.21.1.
+# Generated by GNU Autoconf 2.68 for yast2-fcoe-client 2.21.2.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-fcoe-client'
PACKAGE_TARNAME='yast2-fcoe-client'
-PACKAGE_VERSION='2.21.1'
-PACKAGE_STRING='yast2-fcoe-client 2.21.1'
+PACKAGE_VERSION='2.21.2'
+PACKAGE_STRING='yast2-fcoe-client 2.21.2'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1229,7 +1229,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-fcoe-client 2.21.1 to adapt to many kinds of systems.
+\`configure' configures yast2-fcoe-client 2.21.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1301,7 +1301,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-fcoe-client 2.21.1:";;
+ short | recursive ) echo "Configuration of yast2-fcoe-client 2.21.2:";;
esac
cat <<\_ACEOF
@@ -1381,7 +1381,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-fcoe-client configure 2.21.1
+yast2-fcoe-client configure 2.21.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1398,7 +1398,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-fcoe-client $as_me 2.21.1, which was
+It was created by yast2-fcoe-client $as_me 2.21.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2328,7 +2328,7 @@
# Define the identity of the package.
PACKAGE='yast2-fcoe-client'
- VERSION='2.21.1'
+ VERSION='2.21.2'
cat >>confdefs.h <<_ACEOF
@@ -2450,7 +2450,7 @@
-VERSION="2.21.1"
+VERSION="2.21.2"
RPMNAME="yast2-fcoe-client"
MAINTAINER="Gabriele Mohr "
@@ -3380,7 +3380,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-fcoe-client $as_me 2.21.1, which was
+This file was extended by yast2-fcoe-client $as_me 2.21.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3433,7 +3433,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2-fcoe-client config.status 2.21.1
+yast2-fcoe-client config.status 2.21.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/configure.in new/yast2-fcoe-client-2.21.2/configure.in
--- old/yast2-fcoe-client-2.21.1/configure.in 2011-05-19 11:31:39.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/configure.in 2011-05-31 12:25:11.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-fcoe-client, 2.21.1, http://bugs.opensuse.org/, yast2-fcoe-client)
+AC_INIT(yast2-fcoe-client, 2.21.2, http://bugs.opensuse.org/, yast2-fcoe-client)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.21.1"
+VERSION="2.21.2"
RPMNAME="yast2-fcoe-client"
MAINTAINER="Gabriele Mohr "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/FcoeClient.ycp new/yast2-fcoe-client-2.21.2/src/FcoeClient.ycp
--- old/yast2-fcoe-client-2.21.1/src/FcoeClient.ycp 2011-05-19 10:32:52.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/src/FcoeClient.ycp 2011-05-31 11:00:29.000000000 +0200
@@ -272,8 +272,11 @@
y2milestone( "Output: %1", output );
// read stdout (remove \n and white spaces)
vlan_device_name = deletechars( output["stdout"]:"", " \n\t" );
-
- y2milestone( "Returning: %1", vlan_device_name );
+
+ if ( vlan_device_name != "" )
+ {
+ y2milestone( "Returning: %1", vlan_device_name );
+ }
return vlan_device_name;
}
@@ -287,36 +290,30 @@
if ( vlan_device_name != "")
{
+ // 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 )
{
- // remove '-fcoe' and try again
- file_name = substring( file_name, 0, size(file_name)-5 );
- y2milestone( "Reading %1", file_name );
- content = (string)SCR::Read(.target.string, file_name );
- }
- if ( content == "" || content == nil )
- {
- string create_file_name = sformat( "/etc/fcoe/cfg-%1", vlan_device_name );
y2milestone( "Cannot read cfg-file creating %1 with default values from /etc/fcoe/cfg-ethx",
- create_file_name );
+ file_name );
string def_values = (string)SCR::Read( .target.string, "/etc/fcoe/cfg-ethx" );
if ( def_values != "" && def_values != nil )
{
- boolean ret = SCR::Write( .target.string, create_file_name, def_values );
+ boolean ret = SCR::Write( .target.string, file_name, def_values );
if ( ret == true )
{
status_map = add( status_map, "FCOE_ENABLE", "yes");
status_map = add( status_map, "DCB_REQUIRED", "yes");
- status_map = add( status_map, "Filename", create_file_name );
+ status_map = add( status_map, "Filename", file_name );
+ status_map = add( status_map, "Created", "yes" );
}
else
{
- y2error( "Cannot create %1", create_file_name );
+ y2error( "Cannot create %1", file_name );
}
}
else
@@ -331,7 +328,7 @@
}
list <string> lines = splitstring( content, "\n" );
- // TODO: better/more elegant way of reading values (use SysConfig agent?)
+
foreach( string line, (list<string>)lines, {
if ( regexpmatch( line, "^FCOE_ENABLE" ) )
{
@@ -427,13 +424,12 @@
boolean status = false;
status = Service::Enabled( "fcoe" );
- y2milestone( "Status of fcoe: %1", status );
+ y2milestone( "Start status of fcoe: %1", status );
service_start = add( service_start, "fcoe", status );
status = Service::Enabled( "lldpad" );
- y2milestone( "Status of lldpad: %1", status );
+ y2milestone( "Start status of lldpad: %1", status );
service_start = add( service_start, "lldpad", status );
-
}
global map GetStartStatus()
@@ -444,7 +440,7 @@
global boolean ServiceStatus()
{
// TODO - check whether loading any modules in Stage::initial() is required
- // (like in IsciClientLib.ycp, line 469 )
+ // (like in IsciClientLib.ycp, line 523 )
// probably NOT -> see /etc/init.d/fcoe, line 85 (modprobe fcoe > /dev/null 2>&1)
boolean ret = true;
@@ -491,12 +487,12 @@
}
//
-// dev_name device fcoe_vlan dcb_capable fcoe_enable dcb_required vlan_interface modified cfg_file
+// dev_name device fcoe_vlan fcoe_enable dcb_required dcb_capable vlan_interface modified cfg_file
// eth3 Ethernet card ... eth3.200 yes/no yes/no yes/no 200 yes/no /etc/fcoe/cfg-eth3.200
//
// Detect network interface cards (hardware probe) and get status
//
-boolean DetectNetworkCards()
+global boolean DetectNetworkCards()
{
string vlan_interface = "";
string fcoe_vlan_interface = "";
@@ -517,6 +513,9 @@
if ( vlan_interface == "" )
{
// FCoE isn't enabled on the switch - we can't do anything here
+ // TODO - check link map from .probe.network and distinguish between
+ // no cable attached and interface not up, Steffen: cannot be used, "no"
+ // can stand for 'noe cable' or 'not up'
fcoe_vlan_interface = NOT_AVAILABLE;
}
else
@@ -538,11 +537,11 @@
info_map = add( info_map, "dev_name", card["dev_name"]:""); // network card, e.g. eth3
info_map = add( info_map, "device", card["device"]:""); // description
info_map = add( info_map, "fcoe_vlan", fcoe_vlan_interface ); // FCoE VLAN interface, e.g. eth3.200
- info_map = add( info_map, "dcb_capable", dcb_capable ); // DCB capable
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, "modified", "no" ); // data not modified
+ info_map = add( info_map, "modified", status_map["Created"]:"no" ); // data not modified
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 );
@@ -576,7 +575,7 @@
//
// Read /etc/fcoe/config
//
-boolean ReadFcoeConfig()
+global boolean ReadFcoeConfig()
{
list <string> options = (list<string>) SCR::Dir(.fcoe);
y2milestone( "List of options: %1", options );
@@ -626,7 +625,7 @@
return redo_list;
}
-boolean WriteFcoeConfig()
+global boolean WriteFcoeConfig()
{
boolean ret = true;
@@ -644,7 +643,7 @@
return ret;
}
-boolean WriteCfgFiles()
+global boolean WriteCfgFiles()
{
list <map> netcards = GetNetworkCards();
boolean success = true;
@@ -689,10 +688,15 @@
return success;
}
-boolean RestartServiceFcoe()
+global boolean RestartServiceFcoe()
{
- y2milestone( "Restarting fcoe");
- return Service::Restart("fcoe");
+ boolean ret = true;
+ if ( FcoeClient::Modified() )
+ {
+ y2milestone( "Restarting fcoe");
+ ret = Service::Restart("fcoe");
+ }
+ return ret;
}
/**
@@ -772,11 +776,10 @@
if( !success ) Report::Warning(_("Cannot detect devices."));
sleep(sl);
- // read general FCoE settings
if(PollAbort()) return false;
Progress::NextStage();
- // check daemon fcoemon and lldpad
+ // read general FCoE settings
success = ReadFcoeConfig();
/* Error message */
@@ -827,6 +830,10 @@
],
""
);
+ // TODO things to do in case of Mode::autoinst()/autoupgrade() ???
+ // see IscsiClient.ycp, line 236, 241
+
+ // TODO is_running - used or obsolete ???
boolean is_running = Progress::IsRunning();
y2milestone( "**** Progress still running: %1", is_running );
@@ -858,10 +865,8 @@
// adjust start status of services lldpad and fcoe
AdjustStartStatus();
-
- /* Error message */
- /* TODO - SuSEConfig required ???? */
- if(false) Report::Error (Message::SuSEConfigFailed());
+
+ // TODO - add additional package ??? like in IscsiClient.ycp, line 257
sleep(sl);
if(PollAbort()) return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/Makefile.am new/yast2-fcoe-client-2.21.2/src/Makefile.am
--- old/yast2-fcoe-client-2.21.1/src/Makefile.am 2011-04-20 11:45:19.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/src/Makefile.am 2011-05-30 14:08:20.000000000 +0200
@@ -5,7 +5,9 @@
client_DATA = \
fcoe-client.ycp \
fcoe-client_auto.ycp \
- fcoe-client_proposal.ycp
+ fcoe-client_proposal.ycp \
+ fcoe-client_finish.ycp \
+ inst_fcoe-client.ycp
ynclude_DATA = \
helps.ycp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/Makefile.in new/yast2-fcoe-client-2.21.2/src/Makefile.in
--- old/yast2-fcoe-client-2.21.1/src/Makefile.in 2011-05-19 11:31:42.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/src/Makefile.in 2011-05-31 12:25:14.000000000 +0200
@@ -199,7 +199,9 @@
client_DATA = \
fcoe-client.ycp \
fcoe-client_auto.ycp \
- fcoe-client_proposal.ycp
+ fcoe-client_proposal.ycp \
+ fcoe-client_finish.ycp \
+ inst_fcoe-client.ycp
ynclude_DATA = \
helps.ycp \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/complex.ycp new/yast2-fcoe-client-2.21.2/src/complex.ycp
--- old/yast2-fcoe-client-2.21.1/src/complex.ycp 2011-05-18 14:03:25.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/src/complex.ycp 2011-05-30 12:38:16.000000000 +0200
@@ -37,19 +37,17 @@
import "Confirm";
import "FcoeClient";
import "Service";
-
+import "Stage";
+import "FileUtils";
include "fcoe-client/helps.ycp";
include "fcoe-client/dialogs.ycp";
/**
- * Return a modification status
- * @return true if data was modified
+ * Show a popup on abort if data are modified and
+ * check redo list/execute redo commands.
+ * @return true if users aborts installation
*/
-boolean Modified() {
- return FcoeClient::Modified();
-}
-
boolean ReallyAbort() {
if ( !FcoeClient::Modified() )
return true;
@@ -77,18 +75,13 @@
return abort;
}
-boolean PollAbort() {
- return UI::PollInput() == `abort;
-}
-
/**
* Read settings dialog
* @return `abort if aborted and `next otherwise
*/
symbol ReadDialog() {
Wizard::RestoreHelp(HELPS["read"]:"");
- // TODO - check this - doesn't help to set it here but call PollAbort in FcoeClient directly ???
- //FcoeClient::SetAbortFunction(PollAbort);
+
if (!Confirm::MustBeRoot()) return `abort;
boolean ret = FcoeClient::Read();
return ret ? `next : `abort;
@@ -101,7 +94,7 @@
symbol WriteDialog() {
Wizard::RestoreHelp(HELPS["write"]:"");
y2milestone( "Writing configuration" );
- // FcoeClient::SetAbortFunction(PollAbort);
+
boolean ret = FcoeClient::Write();
return ret ? `next : `abort;
}
@@ -178,7 +171,7 @@
foreach ( map card, (list<map>)netcards, {
table_items = add( table_items,
`item(`id(row), card["dev_name"]:"", card["device"]:"", card["fcoe_vlan"]:"",
- card["dcb_capable"]:"", card["fcoe_enable"]:"", card["dcb_required"]:"" )
+ card["fcoe_enable"]:"", card["dcb_required"]:"", card["dcb_capable"]:"" )
);
row = row + 1;
});
@@ -240,93 +233,170 @@
symbol HandleInterfacesDialog( string id, map event )
{
- any action = event["ID"]:nil;
-
- y2milestone( "Event: %1", event );
+ any action = event["ID"]:nil;
+
+ y2milestone( "Event: %1", event );
- if ( action == `edit )
- {
- y2milestone( "Action: %1, returning %1", action);
- return `edit;
- }
- else if ( action == `interfaces )
- {
- FcoeClient::current_card = (integer)UI::QueryWidget( `id(`interfaces), `CurrentItem );
- AdjustButtons();
- }
- else if ( action == `create )
- {
- map card = FcoeClient::GetCurrentNetworkCard();
- string dev_name = card["dev_name"]:"";
- boolean ret = Popup::YesNoHeadline( _("Creating and starting FCoE on detected VLAN device"),
- sformat( _("Do you really want to create a FCoE network
+ if ( action == `edit )
+ {
+ y2milestone( "Action: %1, returning %1", action);
+ return `edit;
+ }
+ else if ( action == `interfaces )
+ {
+ FcoeClient::current_card = (integer)UI::QueryWidget( `id(`interfaces), `CurrentItem );
+ AdjustButtons();
+ }
+ else if ( action == `create )
+ {
+ map card = FcoeClient::GetCurrentNetworkCard();
+ string dev_name = card["dev_name"]:"";
+
+ string command = "";
+ map output = $[];
+ string vlan_interface = "";
+ string fcoe_vlan_interface = "";
+ map status_map = $[];
+ boolean create_ifcfg = false;
+ string ifcfg_file = "";
+
+ if ( Stage::initial() ) // first stage - 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"),
+ // question to the user: really create and start FCoE
+ sformat( _("Do you really want to create a FCoE network
interface for discovered FCoE VLAN interface
on %1 and start the FCoE initiator?"), dev_name ) );
- if ( ret == true )
- {
- string vlan_interface = "";
- string fcoe_vlan_interface = "";
- map status_map = $[];
- // create and start FCoE with 'fipvlan -c -s eth3'
- // revert this (in case of 'Abort') with 'vconfig rem eth3.200'
- string command = sformat( "fipvlan -c -s %1", dev_name );
- y2milestone( "Executing command: %1", command );
- map output = (map)SCR::Execute( .target.bash_output, command );
- y2milestone( "Output: %1", output );
-
- if ( output["exit"]:255 == 0 )
- {
- // Get new status and exchange list (table) entry
- vlan_interface = FcoeClient::GetVlanInterface( card["dev_name"]:"" );
- if ( vlan_interface == "" )
- {
- fcoe_vlan_interface = FcoeClient::NOT_AVAILABLE;
- }
- else
- {
- fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", vlan_interface );
-
- if ( fcoe_vlan_interface != "" )
- status_map = FcoeClient::GetFCoEStatus( fcoe_vlan_interface );
- else
- fcoe_vlan_interface = FcoeClient::NOT_CONFIGURED;
- }
- y2milestone( "FCoE VLAN interface: %1", fcoe_vlan_interface );
- // set new value in global map network_interfaces
- card["fcoe_vlan"] = fcoe_vlan_interface;
- card["fcoe_enable"] = status_map["FCOE_ENABLE"]:"";
- card["dcb_required"] = status_map["DCB_REQUIRED"]:"";
- card["cfg_file"] = status_map["Filename"]:"";
- card["modified"] = "yes";
- FcoeClient::SetModified( true );
-
- FcoeClient::SetNetworkCardsValue( FcoeClient::current_card, card );
- y2milestone( "Current network interfaces: %1", FcoeClient::GetNetworkCards() );
-
- // replace value in table
- UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 2), fcoe_vlan_interface );
- UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 4), status_map["FCOE_ENABLE"]:"" );
- UI::ChangeWidget( `id( `interfaces), `Cell( FcoeClient::current_card, 5), status_map["DCB_REQUIRED"]:"" );
- AdjustButtons();
- if ( fcoe_vlan_interface != "" )
- {
- // store command to be able to redo the creation of FCoE VLAN interface
- // in case of abort
- FcoeClient::AddRedoCommand( sformat("vconfig rem %1", fcoe_vlan_interface ) );
- }
- }
- else
- {
- Popup::Error( sformat( _("Cannot create and start FCoE on %1"), dev_name ) );
- }
- }
- else
- {
- y2milestone( "Creating VLAN interface canceled" );
- }
- }
+ if ( ret == true )
+ {
+ // create and start FCoE e.g. with 'fipvlan -c -s eth3'
+ // revert this (in case of 'Abort') with 'vconfig rem eth3.200'
+ command = sformat( "fipvlan -c -s %1", dev_name );
+ y2milestone( "Executing command: %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+
+ if ( output["exit"]:255 != 0 )
+ {
+ // text of an error popup
+ Popup::Error( sformat( _("Cannot create and start FCoE on %1"), dev_name ) );
+ return nil;
+ }
+ }
+ else
+ {
+ y2milestone( "Creating FCoE VLAN interface canceled" );
+ return nil;
+ }
+ }
+ else // installed system - if VLAN already exists only start FCoE
+ {
+ // headline of a popup: starting Fibre Channel over Ethernet
+ boolean ret = Popup::YesNoHeadline( _("Starting FCoE on detected VLAN device"),
+ // question to the user: really start FCoE
+ sformat( _("Do you really want to start FCoE initiator
+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 ) )
+ {
+ command = sformat( "ifup %1\.%2", dev_name, card["vlan_interface"]:"" );
+ y2milestone( "Executing command: %1", command );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
- return nil;
+ if ( output["exit"]:255 == 0 )
+ {
+ // start FCoE
+ command = sformat( "fipvlan -s %1", dev_name );
+ }
+ 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 );
+ output = (map)SCR::Execute( .target.bash_output, command );
+ y2milestone( "Output: %1", output );
+ if ( output["exit"]:255 != 0 )
+ {
+ // text of an error popup: command failed on the network interface
+ Popup::Error( sformat( _("Command \"%1\" on %2 failed."), command, dev_name ) );
+ return nil;
+ }
+ }
+ else
+ {
+ y2milestone( "Starting FCoE canceled" );
+ return nil;
+ }
+ }
+
+ // Get new status and exchange list (table) entry
+ vlan_interface = FcoeClient::GetVlanInterface( card["dev_name"]:"" );
+ if ( vlan_interface == "" )
+ {
+ fcoe_vlan_interface = FcoeClient::NOT_AVAILABLE;
+ }
+ else
+ {
+ fcoe_vlan_interface = FcoeClient::GetFcoeVlanInterface( card["dev_name"]:"", vlan_interface );
+
+ 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 redo the creation of FCoE VLAN interface in case of abort
+ // TODO: is this also OK if only 'fipvlan -s <interface>' is called?
+ FcoeClient::AddRedoCommand( 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::AddRedoCommand( sformat( "rm %1", ifcfg_file ) );
+ }
+ }
+ else
+ {
+ fcoe_vlan_interface = FcoeClient::NOT_CONFIGURED;
+ }
+ }
+
+ // set new values in global map network_interfaces
+ card["fcoe_vlan"] = fcoe_vlan_interface;
+ card["fcoe_enable"] = status_map["FCOE_ENABLE"]:"";
+ card["dcb_required"] = status_map["DCB_REQUIRED"]:"";
+ card["cfg_file"] = status_map["Filename"]:"";
+ card["modified"] = "yes";
+ 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), 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"]:"" );
+ AdjustButtons();
+ }
+
+ return nil;
}
symbol HandleConfigurationDialog( string id, map event )
@@ -373,12 +443,22 @@
void StoreConfigurationDialog (string id, map event)
{
y2milestone( "Store configuration dialog" );
+
+ map config = FcoeClient::GetFcoeConfig();
+
string debug_val = (string)UI::QueryWidget( `id("debug"), `Value );
+ if ( config["DEBUG"]:"" != debug_val)
+ {
+ FcoeClient::SetFcoeConfigValue( "DEBUG", debug_val );
+ FcoeClient::SetModified( true );
+ }
string syslog_val = (string)UI::QueryWidget( `id("syslog"), `Value );
- FcoeClient::SetFcoeConfigValue( "DEBUG", debug_val );
- FcoeClient::SetFcoeConfigValue( "USE_SYSLOG", syslog_val );
- FcoeClient::SetModified( true );
+ if ( config["USE_SYSLOG"]:"" != syslog_val )
+ {
+ FcoeClient::SetFcoeConfigValue( "USE_SYSLOG", syslog_val );
+ FcoeClient::SetModified( true );
+ }
}
void StoreEditDialog (string id, map event)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/dialogs.ycp new/yast2-fcoe-client-2.21.2/src/dialogs.ycp
--- old/yast2-fcoe-client-2.21.1/src/dialogs.ycp 2011-05-18 11:47:53.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/src/dialogs.ycp 2011-05-26 13:04:25.000000000 +0200
@@ -119,8 +119,8 @@
return `MarginBox( mbox_x, mbox_y,
`VBox(
`Table(`id(`interfaces), `opt(`notify, `immediate, `keepSorting ),
- `header(_("Device Name"), _("Model"), _("FCoE VLAN Interface"), _("DCB capable"),
- _("FCoE Enable"), _("DCB Required")),
+ `header(_("Device Name"), _("Model"), _("FCoE VLAN Interface"),
+ _("FCoE Enable"), _("DCB Required"), _("DCB capable") ),
[]
),
`Left(`HBox( `PushButton(`id(`edit), _("Change &Settings") ),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/fcoe-client.desktop new/yast2-fcoe-client-2.21.2/src/fcoe-client.desktop
--- old/yast2-fcoe-client-2.21.1/src/fcoe-client.desktop 2011-05-19 10:37:37.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/src/fcoe-client.desktop 2011-05-30 10:58:42.000000000 +0200
@@ -16,7 +16,7 @@
X-SuSE-YaST-SortKey=
X-SuSE-YaST-AutoInstResource=fcoe-client
-Icon=yast-fcoe-client
+Icon=fcoe
Exec=/sbin/yast2 fcoe-client
Name=FCoE Client Configuration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/fcoe-client_finish.ycp new/yast2-fcoe-client-2.21.2/src/fcoe-client_finish.ycp
--- old/yast2-fcoe-client-2.21.1/src/fcoe-client_finish.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-fcoe-client-2.21.2/src/fcoe-client_finish.ycp 2011-05-31 10:39:23.000000000 +0200
@@ -0,0 +1,69 @@
+/**
+ * File:
+ * fcoe-client_finish.ycp
+ *
+ * Module:
+ * Step of base installation finish
+ *
+ * Authors:
+ * Gabriele Mohr
+ *
+ */
+
+{
+
+textdomain "fcoe-client";
+
+import "Directory";
+import "String";
+import "FcoeClient";
+import "Service";
+include "installation/misc.ycp";
+
+any ret = nil;
+string func = "";
+map param = $[];
+
+/* Check arguments */
+if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
+ func = (string)WFM::Args(0);
+ if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
+ param = (map)WFM::Args(1);
+}
+
+y2milestone ("starting fcoe-client_finish");
+y2debug("func=%1", func);
+y2debug("param=%1", param);
+
+if (func == "Info")
+{
+ return (any)$[
+ "steps" : 1,
+ // progress step title
+ "title" : _("Saving fcoe configuration..."),
+ "when" : [ `installation, `update, `autoinst ],
+ ];
+}
+else if (func == "Write")
+{
+ // 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/'");
+
+ // TODO: only enable if any FCoE VLAN interface was enabled
+ Service::Enable("fcoe");
+ Service::Enable("lldpad");
+ y2milestone("fcoe and lldpad services enabled");
+
+}
+else
+{
+ y2error ("unknown function: %1", func);
+ ret = nil;
+}
+
+y2debug("ret=%1", ret);
+y2milestone("fcoe-client_finish finished");
+return ret;
+
+
+} /* EOF */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/inst_fcoe-client.ycp new/yast2-fcoe-client-2.21.2/src/inst_fcoe-client.ycp
--- old/yast2-fcoe-client-2.21.1/src/inst_fcoe-client.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-fcoe-client-2.21.2/src/inst_fcoe-client.ycp 2011-05-31 11:03:39.000000000 +0200
@@ -0,0 +1,105 @@
+/**
+ * File: clients/inst_fcoe-client.ycp
+ * Package: Configuration of fcoe-client
+ * Summary: Main file
+ * Authors: Gabriele Mohr
+ *
+ *
+ * File called in installation workflow for fcoe-client configuration.
+ */
+
+{
+
+/***
+ * <h3>Configuration of fcoe-client</h3>
+ */
+
+textdomain "fcoe-client";
+
+/* The main () */
+y2milestone ("----------------------------------------");
+y2milestone ("FCoEClient module started");
+
+import "Progress";
+import "Report";
+import "Summary";
+import "ModuleLoading";
+import "Packages";
+import "Installation";
+import "String";
+import "FcoeClient";
+import "NetworkService";
+
+include "fcoe-client/wizards.ycp";
+
+/* main ui function */
+any ret = nil;
+boolean success = false;
+
+y2milestone("fcoe-client module started during installation");
+
+// 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
+
+// TODO: check for running network - makes sense here ???
+if( !NetworkService::RunningNetworkPopup() )
+{
+ y2error( "Network NOT set up" );
+ return nil;
+}
+
+// start services fcoe and lldpad
+success = FcoeClient::ServiceStatus();
+if ( !success )
+{
+ y2error( "Starting of services FAILED" );
+ return nil;
+}
+
+// detect netcards
+success = FcoeClient::DetectNetworkCards();
+if ( !success )
+{
+ y2error( "Detecting netcards FAILED" );
+ return nil;
+}
+
+// read general FCoE settings
+success = FcoeClient::ReadFcoeConfig();
+if ( !success )
+{
+ y2error( "Reading /etc/fcoe/config FAILED" );
+ return nil;
+}
+
+// run dialog
+ret = MainSequence();
+y2milestone("MainSequence ret=%1", ret);
+
+// add package open-fcoe to installed system
+Packages::addAdditionalPackage("open-fcoe");
+
+// workflow not aborted
+if ( ret == `next )
+{
+ // write changes to config files
+ FcoeClient::WriteFcoeConfig();
+ FcoeClient::WriteCfgFiles();
+ FcoeClient::RestartServiceFcoe();
+}
+
+/* Finish */
+y2milestone("fcoe-client module finished");
+y2milestone("----------------------------------------");
+
+return ret;
+
+/* EOF */
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-fcoe-client-2.21.1/src/wizards.ycp new/yast2-fcoe-client-2.21.2/src/wizards.ycp
--- old/yast2-fcoe-client-2.21.1/src/wizards.ycp 2011-05-18 14:14:19.000000000 +0200
+++ new/yast2-fcoe-client-2.21.2/src/wizards.ycp 2011-05-31 10:56:36.000000000 +0200
@@ -194,7 +194,7 @@
Wizard::CreateDialog();
any ret = Sequencer::Run(aliases, sequence);
-
+ y2milestone( "**** RETURN of MainSequence ****: %1", ret );
UI::CloseDialog();
return ret;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org