SHA256
1
0
forked from pool/systemd
systemd/fix-support-for-boot-prefixed-initscript-bnc-746506.patch
Dr. Werner Fink 6e615f2c31 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 15:28:49 +00:00

43 lines
1.6 KiB
Diff

From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 23 Aug 2012 11:08:25 +0200
Subject: fix support for boot prefixed initscript (bnc#746506)
---
src/systemctl/systemctl.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
Index: systemd-205/src/systemctl/systemctl.c
===================================================================
--- systemd-205.orig/src/systemctl/systemctl.c
+++ systemd-205/src/systemctl/systemctl.c
@@ -4192,8 +4192,28 @@ static int enable_sysv_units(char **args
p[strlen(p) - sizeof(".service") + 1] = 0;
found_sysv = access(p, F_OK) >= 0;
- if (!found_sysv)
+ if (!found_sysv) {
+#ifdef HAVE_SYSV_COMPAT
+ free(p);
+ p = NULL;
+ if (!isempty(arg_root))
+ asprintf(&p, "%s/" SYSTEM_SYSVINIT_PATH "/boot.%s", arg_root, name);
+ else
+ asprintf(&p, SYSTEM_SYSVINIT_PATH "/boot.%s", name);
+ if (!p) {
+ r = log_oom();
+ goto finish;
+ }
+ p[strlen(p) - sizeof(".service") + 1] = 0;
+ found_sysv = access(p, F_OK) >= 0;
+
+ if (!found_sysv) {
+ continue;
+ }
+#else
continue;
+#endif
+ }
/* Mark this entry, so that we don't try enabling it as native unit */
args[f] = (char*) "";