2024-02-23 17:24:26 +01:00
|
|
|
From 2c821a6c31ce3e2af53274b26fc34648933f6574 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
|
2024-02-23 17:24:26 +01:00
|
|
|
Subject: [PATCH] sysv-generator: translate "Required-Start" into a "Wants"
|
2022-01-14 16:14:43 +01:00
|
|
|
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
|
2024-02-23 17:24:26 +01:00
|
|
|
index 4485e2e368..e0833a7179 100644
|
2020-09-04 08:47:46 +02:00
|
|
|
--- a/src/sysv-generator/sysv-generator.c
|
|
|
|
+++ b/src/sysv-generator/sysv-generator.c
|
2024-02-23 17:24:26 +01:00
|
|
|
@@ -412,8 +412,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();
|
|
|
|
}
|
|
|
|
--
|
2024-02-23 17:24:26 +01:00
|
|
|
2.35.3
|
2020-09-04 08:47:46 +02:00
|
|
|
|