SHA256
1
0
forked from pool/systemd
systemd/service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch
Frederic Crozat 37527bb454 Accepting request 184036 from home:elvigia:branches:Base:System
- version 206 , highlights:
* Unit files now understand the new %v specifier which
  resolves to the kernel version string as returned by "uname-r".
* "journalctl -b" may now be used to look for boot output of a
   specific boot. Try "journalctl -b -1"
* Creation of "dead" device nodes has been moved from udev
  into kmod and tmpfiles.
*  The udev "keymap" data files and tools to apply keyboard
   specific mappings of scan to key codes, and force-release
   scan code lists have been entirely replaced by a udev
   "keyboard" builtin and a hwdb data file.
- remove patches now in upstream
- systemd now requires libkmod >=14 and cryptsetup >= 1.6.0
- systemd now require the kmod tool in addition to the library.

- version 206 , highlights:
* Unit files now understand the new %v specifier which
  resolves to the kernel version string as returned by "uname-r".
* "journalctl -b" may now be used to look for boot output of a
   specific boot. Try "journalctl -b -1"
* Creation of "dead" device nodes has been moved from udev
  into kmod and tmpfiles.
*  The udev "keymap" data files and tools to apply keyboard
   specific mappings of scan to key codes, and force-release
   scan code lists have been entirely replaced by a udev
   "keyboard" builtin and a hwdb data file.
- remove patches now in upstream
- systemd now requires libkmod >=14 and cryptsetup >= 1.6.0
- systemd now require the kmod tool in addition to the library. (forwarded request 184035 from elvigia)

OBS-URL: https://build.opensuse.org/request/show/184036
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=416
2013-07-23 09:21:21 +00:00

32 lines
1.2 KiB
Diff

From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 30 Sep 2011 12:58:17 +0200
Subject: 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/core/service.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- systemd-206.orig/src/core/service.c
+++ systemd-206/src/core/service.c
@@ -2092,8 +2092,13 @@ static void service_enter_running(Servic
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