mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
systemd: Disable DefaultDependencies for sysv scripts on rcS runlevel
systemd-sysv-generator translate sysv services on rcS runlevel to
services that starts before sysinit.target. This behavour conflict
with default dependency on same tartget.
String that define "DefaultDependency=no" was lost from patch for
sysv generator during porting patches to systemd 229 in commit
64ab17b707.
Current commit returns changes required for services that work on
rcS runlevel.
(From OE-Core rev: 5c0a87c94ab086514039f2f8d0e9b06daa2179a7)
Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e45e0dbcca
commit
0f33bfad25
@@ -57,7 +57,17 @@ index b5925a4..ea06d6a 100644
|
||||
} SysvStub;
|
||||
|
||||
static void free_sysvstub(SysvStub *s) {
|
||||
@@ -711,17 +717,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
|
||||
@@ -194,6 +198,9 @@ static int generate_unit_file(SysvStub *s) {
|
||||
if (s->description)
|
||||
fprintf(f, "Description=%s\n", s->description);
|
||||
|
||||
+ if (!s->default_dependencies)
|
||||
+ fprintf(f, "DefaultDependencies=no\n");
|
||||
+
|
||||
STRV_FOREACH(p, s->before)
|
||||
fprintf(f, "Before=%s\n", *p);
|
||||
STRV_FOREACH(p, s->after)
|
||||
@@ -711,17 +720,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
|
||||
if (s->has_lsb && other->has_lsb)
|
||||
continue;
|
||||
|
||||
@@ -95,7 +105,7 @@ index b5925a4..ea06d6a 100644
|
||||
|
||||
/* FIXME: Maybe we should compare the name here lexicographically? */
|
||||
}
|
||||
@@ -788,6 +808,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
|
||||
@@ -788,6 +811,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
|
||||
return log_oom();
|
||||
|
||||
service->sysv_start_priority = -1;
|
||||
@@ -104,7 +114,7 @@ index b5925a4..ea06d6a 100644
|
||||
service->name = name;
|
||||
service->path = fpath;
|
||||
name = fpath = NULL;
|
||||
@@ -871,9 +893,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
|
||||
@@ -871,9 +896,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
|
||||
|
||||
if (de->d_name[0] == 'S') {
|
||||
|
||||
@@ -118,7 +128,7 @@ index b5925a4..ea06d6a 100644
|
||||
r = set_ensure_allocated(&runlevel_services[i], NULL);
|
||||
if (r < 0) {
|
||||
log_oom();
|
||||
@@ -887,7 +911,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
|
||||
@@ -887,7 +914,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
|
||||
}
|
||||
|
||||
} else if (de->d_name[0] == 'K' &&
|
||||
|
||||
Reference in New Issue
Block a user