mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +00:00
Improve event debugging
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e7db6c6ac6
commit
7569c479b8
2 files changed
+10
-1
No files matched your search
@@ -209,8 +209,10 @@ void event_dispatch(char *msg)
|
|||||||
if (svc->type != SVC_TYPE_SERVICE ||
|
if (svc->type != SVC_TYPE_SERVICE ||
|
||||||
!service_enabled(svc, 1, NULL) ||
|
!service_enabled(svc, 1, NULL) ||
|
||||||
!has_events(svc->events) ||
|
!has_events(svc->events) ||
|
||||||
!matches_event(svc->events, msg))
|
!matches_event(svc->events, msg)) {
|
||||||
|
_d("No match for %s in service %s", msg, svc->cmd);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (change == 1) {
|
if (change == 1) {
|
||||||
_d("%s matches <%s> %s (re)starting ...", msg, svc->events, svc->cmd);
|
_d("%s matches <%s> %s (re)starting ...", msg, svc->events, svc->cmd);
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ svc_cmd_t service_enabled(svc_t *svc, int event, void *arg)
|
|||||||
/*
|
/*
|
||||||
* Event conditions for services are ignored during bootstrap.
|
* Event conditions for services are ignored during bootstrap.
|
||||||
*/
|
*/
|
||||||
|
_d("Checking %s runlevel %d and events %s", svc->cmd, runlevel, svc->events);
|
||||||
if (runlevel && !event_service_cond(svc->events))
|
if (runlevel && !event_service_cond(svc->events))
|
||||||
return SVC_STOP;
|
return SVC_STOP;
|
||||||
|
|
||||||
@@ -146,6 +147,12 @@ svc_cmd_t service_enabled(svc_t *svc, int event, void *arg)
|
|||||||
return SVC_STOP;
|
return SVC_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_d("%s => %s", svc->cmd, (cmd == SVC_START
|
||||||
|
? "SVC_START"
|
||||||
|
: (cmd == SVC_RELOAD
|
||||||
|
? "SVC_RELOAD"
|
||||||
|
: "SVC_STOP")));
|
||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user