mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
Follow-up to c9f1bff, only allow daemons to reach 'READY' state
By definition, the readiness notification is reserved for daemons. May possibly be extended also to sysv services later. If you arrive hare with that request, please file an issue with the project. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
c9f1bff419
commit
278994781b
1 file changed
+4
-1
+4
-1
@@ -2038,11 +2038,14 @@ void service_forked(svc_t *svc)
|
||||
svc_set_state(svc, SVC_RUNNING_STATE);
|
||||
}
|
||||
|
||||
/* Set service/foo/ready condition and call optional ready:script */
|
||||
/* Set service/foo/ready condition for services and call optional ready:script */
|
||||
void service_ready(svc_t *svc)
|
||||
{
|
||||
char buf[MAX_COND_LEN];
|
||||
|
||||
if (!svc_is_daemon(svc))
|
||||
return;
|
||||
|
||||
snprintf(buf, sizeof(buf), "service/%s/ready", svc_ident(svc, NULL, 0));
|
||||
cond_set(buf);
|
||||
|
||||
|
||||
Reference in new issue
Block a user