mirror of
https://github.com/troglobit/finit.git
synced 2026-10-25 12:04:36 +00:00
Wait for all services to complete before changing runlevel
We allow all run/task/services to complete before changing runlevel. This means stepping them all while we wait for their completion, since services may depend on each other. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
231b887b2a
commit
060de93b5b
2 files changed
+6
No files matched your search
@@ -1267,6 +1267,9 @@ void service_bootstrap_cb(uev_t *w, void *arg, int events)
|
||||
static int cnt = 120;
|
||||
void (*finalize)(void) = arg;
|
||||
|
||||
_d("Step all services ...");
|
||||
service_step_all(SVC_TYPE_ANY);
|
||||
|
||||
_d("Checking completion of all run/task ... %d", cnt);
|
||||
if (cnt-- > 0 && !service_runtask_completed(!runlevel))
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user