2011-09-30 17:58:39 +02:00
|
|
|
From: Frederic Crozat <fcrozat@suse.com>
|
|
|
|
Date: Fri, 30 Sep 2011 12:58:17 +0200
|
2013-04-13 13:09:53 +02:00
|
|
|
Subject: service: flags sysv service with detected pid as
|
|
|
|
RemainAfterExit=false
|
2011-09-30 17:58:39 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
---
|
2013-04-13 13:09:53 +02:00
|
|
|
src/core/service.c | 7 ++++++-
|
|
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
2011-09-30 17:58:39 +02:00
|
|
|
|
2013-07-23 11:21:21 +02:00
|
|
|
--- systemd-206.orig/src/core/service.c
|
|
|
|
+++ systemd-206/src/core/service.c
|
Accepting request 182204 from home:fcrozat:branches:Base:System
- Update to release 205:
+ two new unit types have been introduced:
- Scope units are very similar to service units, however, are
created out of pre-existing processes -- instead of PID 1
forking off the processes.
- Slice units may be used to partition system resources in an
hierarchial fashion and then assign other units to them. By
default there are now three slices: system.slice (for all
system services), user.slice (for all user sessions),
machine.slice (for VMs and containers).
+ new concept of "transient" units, which are created at runtime
using an API and not based on configuration from disk.
+ logind has been updated to make use of scope and slice units to
manage user sessions. Logind will no longer create cgroups
hierchies itself but will relying on PID 1.
+ A new mini-daemon "systemd-machined" has been added which
may be used by virtualization managers to register local
VMs/containers. machinectl tool has been added to query
meta-data from systemd-machined.
+ Low-level cgroup configuration options ControlGroup=,
ControlGroupModify=, ControlGroupPersistent=,
ControlGroupAttribute= have been removed. High-level attribute
settings or slice units should be used instead?
+ A new bus call SetUnitProperties() has been added to alter
various runtime parameters of a unit, including cgroup
parameters. systemctl gained set-properties command to wrap
this call.
+ A new tool "systemd-run" has been added which can be used to
run arbitrary command lines as transient services or scopes,
while configuring a number of settings via the command
OBS-URL: https://build.opensuse.org/request/show/182204
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=412
2013-07-04 17:28:49 +02:00
|
|
|
@@ -2092,8 +2092,13 @@ static void service_enter_running(Servic
|
2011-09-30 17:58:39 +02:00
|
|
|
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
|