Author: gs Date: Wed Apr 20 13:04:02 2011 New Revision: 63839 URL: http://svn.opensuse.org/viewcvs/yast?rev=63839&view=rev Log: get fcoe status Modified: trunk/fcoe-client/src/complex.ycp Modified: trunk/fcoe-client/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/complex.ycp?rev=63839&r1=63838&r2=63839&view=diff ============================================================================== --- trunk/fcoe-client/src/complex.ycp (original) +++ trunk/fcoe-client/src/complex.ycp Wed Apr 20 13:04:02 2011 @@ -88,6 +88,32 @@ y2milestone( "Init services dialog" ); } +// +// +// +boolean GetFCoEStatus( string interface ) +{ + boolean ret = true; + string vlan_interface = ""; + string command = sformat( "sed -n \"s/\([^ ]*\) *.*${%1}/\1/p\" /proc/net/vlan/config", interface ); + y2milestone( "Executing command: %1", command ); + + map output = (map)SCR::Execute( .target.bash_output, command ); + vlan_interface = output["stdout"]:""; + if (vlan_interface != "") + { + y2milestone( "VLAN channel %1 found, reading /etc/fcoe/cfg-%1", vlan_interface ); + + } + else + { + y2milestone( "Nothing configured for %1", interface ); + ret = false; + } + + return ret; +} + void InitInterfacesDialog (string id) { y2milestone( "Init interfaces dialog" ); @@ -96,7 +122,10 @@ list <term> table_items = []; integer row = 0; + boolean fcoe_status = false; + foreach ( map card, netcards, { + fcoe_status = GetFCoEStatus( card["dev_name"]:"" ); table_items = add( table_items, `item(`id(row), card["dev_name"]:"", card["device"]:"" ) ); row = row + 1; }); @@ -105,6 +134,7 @@ } + void InitConfigurationDialog (string id) { y2milestone( "Init configuration dialog" ); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org