forked from pool/systemd
Frederic Crozat
7cf3cf82cb
- 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
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 700b1261115a67392014ff2c887a9cffc28108ab Mon Sep 17 00:00:00 2001
|
|
From: Frederic Crozat <fcrozat@suse.com>
|
|
Date: Fri, 30 Sep 2011 12:58:17 +0200
|
|
Subject: [PATCH] service: flags sysv service with detected pid as RemainAfterExit=false
|
|
|
|
LSB header doesn't give pidfile, so all LSB initscripts have
|
|
RemainAfterExit=false, causing daemon termination to not be reported as
|
|
such by systemd. Checking at startup if daemon is still running for
|
|
sysv initscript to disable RemainAfterExit helps a lot.
|
|
Fixes https://bugzilla.novell.com/show_bug.cgi?id=721426
|
|
---
|
|
src/service.c | 8 +++++++-
|
|
1 files changed, 7 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/src/service.c b/src/service.c
|
|
index 6b7064a..eb2699c 100644
|
|
--- a/src/service.c
|
|
+++ b/src/service.c
|
|
@@ -2012,9 +2012,15 @@ static void service_enter_running(Service *s, bool success) {
|
|
main_pid_ok = main_pid_good(s);
|
|
cgroup_ok = cgroup_good(s);
|
|
|
|
+
|
|
if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&
|
|
- (s->bus_name_good || s->type != SERVICE_DBUS))
|
|
+ (s->bus_name_good || s->type != SERVICE_DBUS)) {
|
|
+#ifdef HAVE_SYSV_COMPAT
|
|
+ if (s->sysv_enabled && !s->pid_file)
|
|
+ s->remain_after_exit = false;
|
|
+#endif
|
|
service_set_state(s, SERVICE_RUNNING);
|
|
+ }
|
|
else if (s->remain_after_exit)
|
|
service_set_state(s, SERVICE_EXITED);
|
|
else
|
|
--
|
|
1.7.3.4
|
|
|