systemd/0001-service-Fix-dependencies-added-when-parsing-insserv..patch
Frederic Crozat 7cf3cf82cb Accepting request 85813 from home:fcrozat:systemd
- Update to version 36 :
  - many bugfixes
  - systemd now requires socket-activated syslog implementations
  - After=syslog.target is no longer needed in .service files
  - X-Interactive is ignored in LSB headers (was not working)
- Enable back insserv.conf parsing in systemd core and fix added
  dependencies (bnc#721428).
- Fix detection of LSB services status when running daemon
  (bnc#721426).
- Drop 0001-execute-fix-bus-serialization-for-commands.patch,
  fix-reload.patch

OBS-URL: https://build.opensuse.org/request/show/85813
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=204
2011-09-30 15:58:39 +00:00

45 lines
2.0 KiB
Diff

From 6620bceb7233a830be3635a4f7a7dc75c13a9c8e Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 30 Sep 2011 14:12:45 +0200
Subject: [PATCH] service: Fix dependencies added when parsing insserv.conf
---
src/service.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/service.c b/src/service.c
index c2053ce..4abc7e7 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3031,18 +3031,20 @@ static void sysv_facility_in_insserv_conf(Manager *mgr) {
char *dep = NULL, *name, **j;
STRV_FOREACH (j, parsed+1) {
- if (*j[0]=='+') {
- e = UNIT_WANTS;
+ if (*j[0]=='+')
name = *j+1;
- }
- else {
- e = UNIT_REQUIRES;
+ else
name = *j;
- }
+ if (streq(name, "boot.localfs") ||
+ streq(name, "boot.crypto"))
+ continue;
+
if (sysv_translate_facility(name, NULL, &dep) < 0)
continue;
- r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, e, dep, NULL, true);
+ r = unit_add_dependency_by_name_inverse(u, UNIT_BEFORE, dep, NULL, true);
+ if (*j[0]!='+')
+ r = unit_add_dependency_by_name(u, UNIT_REQUIRES, dep, NULL, true);
free(dep);
}
}
--
1.7.3.4