]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: Disable DefaultDependencies for sysv scripts on rcS runlevel
authorNikolay Merinov <n.merinov@inango-systems.com>
Wed, 26 Jul 2017 08:05:08 +0000 (13:05 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Aug 2017 14:11:40 +0000 (15:11 +0100)
systemd-sysv-generator translate sysv services on rcS runlevel to
services that starts before sysinit.target. This behavour conflict
with default dependency on same tartget.

String that define "DefaultDependency=no" was lost from patch for
sysv generator during porting patches to systemd 229 in commit
64ab17b707dc431aaed880d6d8615971243f46f8.

Current commit returns changes required for services that work on
rcS runlevel.

Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch

index ac67f6568537fe879d61e5b530c4563952f8e8fc..5736f57814c5ee6ef7983a54bc2e55f455dba0fc 100644 (file)
@@ -57,7 +57,17 @@ index b5925a4..ea06d6a 100644
  } SysvStub;
  
  static void free_sysvstub(SysvStub *s) {
-@@ -711,17 +717,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+@@ -194,6 +198,9 @@ static int generate_unit_file(SysvStub *s) {
+         if (s->description)
+                 fprintf(f, "Description=%s\n", s->description);
++        if (!s->default_dependencies)
++                fprintf(f, "DefaultDependencies=no\n");
++
+         STRV_FOREACH(p, s->before)
+                 fprintf(f, "Before=%s\n", *p);
+         STRV_FOREACH(p, s->after)
+@@ -711,17 +720,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
                  if (s->has_lsb && other->has_lsb)
                          continue;
  
@@ -95,7 +105,7 @@ index b5925a4..ea06d6a 100644
  
                  /* FIXME: Maybe we should compare the name here lexicographically? */
          }
-@@ -788,6 +808,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
+@@ -788,6 +811,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
                                  return log_oom();
  
                          service->sysv_start_priority = -1;
@@ -104,7 +114,7 @@ index b5925a4..ea06d6a 100644
                          service->name = name;
                          service->path = fpath;
                          name = fpath = NULL;
-@@ -871,9 +893,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
+@@ -871,9 +896,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
  
                                  if (de->d_name[0] == 'S')  {
  
@@ -118,7 +128,7 @@ index b5925a4..ea06d6a 100644
                                          r = set_ensure_allocated(&runlevel_services[i], NULL);
                                          if (r < 0) {
                                                  log_oom();
-@@ -887,7 +911,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
+@@ -887,7 +914,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
                                          }
  
                                  } else if (de->d_name[0] == 'K' &&