240 |
|
|
241 |
} else if(IS(action, "monitor")) { |
} else if(IS(action, "monitor")) { |
242 |
|
|
243 |
|
/* We only enable monitoring of this service and all prerequisite |
244 |
|
* services. Chain of services which depends on this service keep |
245 |
|
* its state */ |
246 |
do_monitor(s); |
do_monitor(s); |
247 |
|
|
248 |
} else if(IS(action, "unmonitor")) { |
} else if(IS(action, "unmonitor")) { |
249 |
|
|
250 |
|
/* We disable monitoring of this service and all services which |
251 |
|
* depends on it */ |
252 |
|
do_depend(s, "unmonitor"); |
253 |
do_unmonitor(s); |
do_unmonitor(s); |
254 |
|
|
255 |
} |
} |
411 |
/* Reset the proc info object in case of a later restart */ |
/* Reset the proc info object in case of a later restart */ |
412 |
memset(s->procinfo, 0, sizeof *(s->procinfo)); |
memset(s->procinfo, 0, sizeof *(s->procinfo)); |
413 |
|
|
|
if(s->dependantlist) { |
|
|
|
|
|
Dependant_T d; |
|
|
|
|
|
for(d= s->dependantlist; d; d= d->next ) { |
|
|
|
|
|
Service_T parent= get_service(d->dependant); |
|
|
ASSERT(parent); |
|
|
do_unmonitor(parent); |
|
|
|
|
|
} |
|
|
} |
|
414 |
} |
} |
415 |
|
|
416 |
|
|
477 |
|
|
478 |
if(IS(action, "start")) |
if(IS(action, "start")) |
479 |
do_start(child); |
do_start(child); |
480 |
|
else if(IS(action, "monitor")) |
481 |
|
do_monitor(child); |
482 |
|
|
483 |
do_depend(child, action); |
do_depend(child, action); |
484 |
|
|
485 |
if(IS(action, "stop")) |
if(IS(action, "stop")) |
486 |
do_stop(child); |
do_stop(child); |
487 |
|
else if(IS(action, "unmonitor")) |
488 |
|
do_unmonitor(child); |
489 |
|
|
490 |
return; |
return; |
491 |
|
|