mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-02-25 21:29:54 +07:00
sysv: add basic.target dependencies only for normal init scripts
This commit is contained in:
parent
8309400a17
commit
0bc824be78
14
service.c
14
service.c
@ -592,9 +592,17 @@ static int service_load_sysv_path(Service *s, const char *path, UnitLoadState *n
|
||||
if ((r = sysv_exec_commands(s)) < 0)
|
||||
goto finish;
|
||||
|
||||
if ((r = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_BASIC_TARGET)) < 0 ||
|
||||
(r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_BASIC_TARGET)) < 0)
|
||||
goto finish;
|
||||
if (!s->sysv_runlevels || chars_intersect("12345", s->sysv_runlevels)) {
|
||||
/* If there a runlevels configured for this service
|
||||
* but none of the standard ones, then we assume this
|
||||
* is some special kind of service (which might be
|
||||
* needed for early boot) and don't create any links
|
||||
* to it. */
|
||||
|
||||
if ((r = unit_add_dependency_by_name(u, UNIT_REQUIRES, SPECIAL_BASIC_TARGET)) < 0 ||
|
||||
(r = unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_BASIC_TARGET)) < 0)
|
||||
goto finish;
|
||||
}
|
||||
|
||||
*new_state = UNIT_LOADED;
|
||||
r = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user