2022-01-14 16:14:43 +01:00
|
|
|
From 9e6a1f4b085b29abaf90ecd05859537b837b39fe Mon Sep 17 00:00:00 2001
|
2020-09-04 08:47:46 +02:00
|
|
|
From: Thomas Blume <Thomas.Blume@suse.com>
|
|
|
|
Date: Wed, 4 May 2016 17:40:04 +0200
|
2022-01-14 16:14:43 +01:00
|
|
|
Subject: [PATCH 8/8] sysv-generator: translate "Required-Start" into a "Wants"
|
|
|
|
dependency
|
2020-09-04 08:47:46 +02:00
|
|
|
|
2022-01-14 16:14:43 +01:00
|
|
|
'Required-Start:' used to be supported by insserv but this functionality was
|
|
|
|
dropped when insserv was rewritten into a compat perl wrapper (insserv-compat),
|
|
|
|
which happened when systemd was introduced in SUSE, I guess.
|
|
|
|
|
|
|
|
It's been decided to add back the support in systemd instead of insserv-compat,
|
|
|
|
see the comments in bsc#857204.
|
2020-09-04 08:47:46 +02:00
|
|
|
|
2022-01-14 16:14:43 +01:00
|
|
|
[tblume: Port of SLES12SP1 patch 0018-Make-LSB-Skripts-know-about-Required-and-Should.patch]
|
2020-09-04 08:47:46 +02:00
|
|
|
|
2022-01-14 16:14:43 +01:00
|
|
|
[wfink: fixes bsc#857204]
|
2020-09-04 08:47:46 +02:00
|
|
|
---
|
2022-01-14 16:14:43 +01:00
|
|
|
src/sysv-generator/sysv-generator.c | 7 ++++++-
|
|
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
2020-09-04 08:47:46 +02:00
|
|
|
|
|
|
|
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
|
2022-01-14 16:14:43 +01:00
|
|
|
index bf23c48662..c6e1953839 100644
|
2020-09-04 08:47:46 +02:00
|
|
|
--- a/src/sysv-generator/sysv-generator.c
|
|
|
|
+++ b/src/sysv-generator/sysv-generator.c
|
2022-01-14 16:14:43 +01:00
|
|
|
@@ -409,8 +409,13 @@ static int handle_dependencies(SysvStub *s, unsigned line, const char *full_text
|
2020-09-04 08:47:46 +02:00
|
|
|
return log_oom();
|
|
|
|
|
|
|
|
r = strv_extend(&s->wants, m);
|
|
|
|
- } else
|
|
|
|
+ } else {
|
|
|
|
r = strv_extend(is_before ? &s->before : &s->after, m);
|
|
|
|
+
|
2022-01-14 16:14:43 +01:00
|
|
|
+ if (startswith_no_case(full_text, "Required-Start:"))
|
2020-09-04 08:47:46 +02:00
|
|
|
+ r = strv_extend(&s->wants, m);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
if (r < 0)
|
|
|
|
return log_oom();
|
|
|
|
}
|
|
|
|
--
|
2022-01-14 16:14:43 +01:00
|
|
|
2.31.1
|
2020-09-04 08:47:46 +02:00
|
|
|
|