Skip to content

Commit

Permalink
ifup: include and sort children using nanny
Browse files Browse the repository at this point in the history
  • Loading branch information
wipawel committed Jul 9, 2014
1 parent 2d190f2 commit 3e29e1f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions client/ifup.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ static ni_bool_t
ni_ifup_start_policy(ni_ifworker_t *w)
{
xml_node_t *ifcfg = NULL, *policy = NULL;
unsigned int i;
ni_bool_t rv = FALSE;
char *pname;

Expand Down Expand Up @@ -182,14 +181,6 @@ ni_ifup_start_policy(ni_ifworker_t *w)
ni_debug_application("%s: nanny hired!", w->name);
ni_ifworker_success(w);

/* Append policies for all children in case they contain some special options */
for (i = 0; i < w->children.count; i++) {
ni_ifworker_t *child = w->children.data[i];

if (!ni_ifup_start_policy(child))
ni_error("%s: unable to apply configuration to nanny", child->name);
}

rv = TRUE;

error:
Expand Down Expand Up @@ -533,6 +524,9 @@ ni_do_ifup_nanny(int argc, char **argv)
ni_fsm_get_matching_workers(fsm, &ifmatch, &ifmarked);
}

ni_fsm_pull_in_children(&ifmarked);
ni_ifworkers_flatten(&ifmarked);

if (!ni_ifup_hire_nanny(&ifmarked, set_persistent))
status = NI_WICKED_RC_NOT_CONFIGURED;

Expand Down

0 comments on commit 3e29e1f

Please sign in to comment.