[yast-commit] r64747 - /branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client_finish.ycp
![](https://seccdn.libravatar.org/avatar/1221572c74a1df78a3aa2625b979eb21.jpg?s=120&d=mm&r=g)
Author: gs Date: Tue Jul 5 12:39:31 2011 New Revision: 64747 URL: http://svn.opensuse.org/viewcvs/yast?rev=64747&view=rev Log: only enable services if any FCoE interface is enabled Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client_finish.ycp Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client_finish.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-c... ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client_finish.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/fcoe-client_finish.ycp Tue Jul 5 12:39:31 2011 @@ -46,13 +46,28 @@ } 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/'"); + boolean start_services = false; + + // 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"); + // only enable services if any FCoE VLAN interface is enabled + list <map> netcards = FcoeClient::GetNetworkCards(); + + foreach ( map card, netcards { + if ( card["fcoe_vlan"]:"" != FcoeClient::NOT_AVAILABLE && + card["fcoe_vlan"]:"" != FcoeClient::NOT_CONFIGURED ) + { + // FCoE VLAN interface is configured + start_services = true; + } + } ); + if ( start_services ) + { + Service::Enable("fcoe"); + Service::Enable("lldpad"); + } + y2milestone("fcoe and lldpad services enabled"); } else -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn2.opensuse.org