From e21840cfced42425b9e742fbd199a19369d0b614 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 20 Mar 2019 15:27:13 +0100 Subject: initd: don't start runsvc for services without exec block First in rdsvc, tag the services that *do* have exec lines, even if we don't read them. Second, if a service does not have that flag set, don't try to execute it. Signed-off-by: David Oberhollenzer --- initd/supervisor.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'initd') diff --git a/initd/supervisor.c b/initd/supervisor.c index cd38469..451ad93 100644 --- a/initd/supervisor.c +++ b/initd/supervisor.c @@ -156,6 +156,14 @@ bool supervisor_process_queues(void) svc = queue; queue = queue->next; + if (!(svc->flags & SVC_FLAG_HAS_EXEC)) { + print_status(svc->desc, STATUS_OK, false); + svc->status = EXIT_SUCCESS; + svc->next = completed; + completed = svc; + goto out; + } + if (start_service(svc) != 0) return true; @@ -171,7 +179,7 @@ bool supervisor_process_queues(void) singleshot += 1; break; } - +out: if (singleshot == 0 && queue == NULL && !waiting) target_completed(target); return true; -- cgit v1.2.3