mirror of
https://github.com/troglobit/finit.git
synced 2026-10-27 12:20:54 +00:00
Fix #378: add run/task support for <!> to allow transition from bootstrap
This odd little feature makes it possible to declare run/tasks with a condition that does not block Finit transitioning from bootstrap to the next runlevel. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
5ff28c4dc6
commit
5281d82e80
3 files changed
+50
-5
No files matched your search
+13
-2
@@ -656,11 +656,22 @@ void conf_parse_cond(svc_t *svc, char *cond)
|
||||
return;
|
||||
}
|
||||
|
||||
/* First character must be '!' if SIGHUP is not supported. */
|
||||
/*
|
||||
* First character must be '!' if:
|
||||
* - service: SIGHUP is not supported
|
||||
* - run/task: Do not block bootstrap
|
||||
*/
|
||||
ptr = cond;
|
||||
if (ptr[i] == '!') {
|
||||
svc->sighup = 0;
|
||||
ptr++;
|
||||
|
||||
if (svc_is_runtask(svc)) {
|
||||
/* see service_runtask_clean() */
|
||||
svc->sighup = 1;
|
||||
svc->once = 1;
|
||||
} else {
|
||||
svc->sighup = 0;
|
||||
}
|
||||
}
|
||||
|
||||
while (ptr[i] != '>' && ptr[i] != 0)
|
||||
|
||||
Reference in new issue
Block a user