Print this page
7267 SMF is fast and loose with optional dependencies (fixes)
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Albert Lee <trisk@omniti.com>

*** 161,181 **** static int gt_enter_offline(scf_handle_t *h, graph_vertex_t *v, restarter_instance_state_t old_state, restarter_error_t rerr) { int to_offline = v->gv_flags & GV_TOOFFLINE; v->gv_flags &= ~GV_TOOFFLINE; /* * If the instance should be enabled, see if we can start it. * Otherwise send a disable command. * If a instance has the GV_TOOFFLINE flag set then it must * remains offline until the disable process completes. */ if (v->gv_flags & GV_ENABLED) { ! if (to_offline == 0) graph_start_if_satisfied(v); } else { if (gt_running(old_state) && v->gv_post_disable_f) v->gv_post_disable_f(); --- 161,182 ---- static int gt_enter_offline(scf_handle_t *h, graph_vertex_t *v, restarter_instance_state_t old_state, restarter_error_t rerr) { int to_offline = v->gv_flags & GV_TOOFFLINE; + int to_disable = v->gv_flags & GV_TODISABLE; v->gv_flags &= ~GV_TOOFFLINE; /* * If the instance should be enabled, see if we can start it. * Otherwise send a disable command. * If a instance has the GV_TOOFFLINE flag set then it must * remains offline until the disable process completes. */ if (v->gv_flags & GV_ENABLED) { ! if (to_offline == 0 && to_disable == 0) graph_start_if_satisfied(v); } else { if (gt_running(old_state) && v->gv_post_disable_f) v->gv_post_disable_f();