Skip to content

Commit

Permalink
adapt to mvidner reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Oct 14, 2013
1 parent 3c91e05 commit 004cede
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions wfm/src/WFMSubAgent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,22 @@ WFMSubAgent::start ()
{
y2debug ("Creating SubAgent: %d %s", my_handle, my_name.c_str ());
// different behavior in chroot and non-chroot as for chroot we need to
// handle specially system namespace via scr_remote
// handle specially system namespace via scr_remote and agents call via
// Scripting agent
// TODO remove after perl-bootloader die, then else branch is enough
if (my_name.find("chroot") != string::npos)
{
Y2Component *scr_comp = Y2ComponentBroker::createServer (my_name.c_str ());
// set to my_comp component for `System::` namespace and in my_agent
// ScriptingAgent with target root
// see Y2WFMComponent::SCRSetDefault implementation for details
// how it exactly works
my_comp = Y2ComponentBroker::createServer ((my_name+"_remote").c_str ());
Y2Component *scr_comp = Y2ComponentBroker::createServer (my_name.c_str ());
if (!scr_comp)
{
ycp2error ("Can't create component 'scr'");
ycp2error ("Can't create component %s", my_name.c_str());
return false;
}
// WFM subagent use specialized agent for remote and scr_remote as
// component
// see Y2WFMComponent::SCRSetDefault implementation for details
// how it works
my_agent = scr_comp->getSCRAgent();
}
else
Expand Down

0 comments on commit 004cede

Please sign in to comment.