]> git.pld-linux.org Git - packages/systemd.git/blobdiff - pld-sysv-network.patch
up to 246.1
[packages/systemd.git] / pld-sysv-network.patch
index 1c551720e3bdb133323224ec4a2188f489e2c09b..e2eb088ca172193dc1ad80ae3711b766b936f40d 100644 (file)
@@ -1,16 +1,32 @@
---- systemd-38/src/service.c~  2012-01-26 00:12:06.239561034 +0100
-+++ systemd-38/src/service.c   2012-01-26 18:26:15.476825041 +0100
-@@ -516,6 +516,13 @@
+--- systemd-240/man/systemd.special.xml.orig   2019-01-13 09:31:46.448992299 +0100
++++ systemd-240/man/systemd.special.xml        2019-01-13 09:48:30.415647502 +0100
+@@ -940,6 +940,10 @@
+             <varname>After=</varname> for this target unit to all SysV
+             init script service units with an LSB header referring to
+             the <literal>$portmap</literal> facility.</para>
++
++            <para>PLD specific: also scripts with
++            <literal>. /etc/sysconfig/network</literal>
++            source line get the dependency.</para>
+           </listitem>
+         </varlistentry>
+         <varlistentry>
+diff -dur -x '*.orig' systemd-218.orig/src/sysv-generator/sysv-generator.c systemd-218/src/sysv-generator/sysv-generator.c
+--- systemd-218.orig/src/sysv-generator/sysv-generator.c       2014-12-05 01:26:51.000000000 +0100
++++ systemd-218/src/sysv-generator/sysv-generator.c    2015-04-03 15:02:21.000000000 +0200
+@@ -325,6 +325,15 @@
                  line++;
  
                  t = strstrip(l);
-+                # PLD specifick ugly hack to detect SysV services requiring networking
++                // PLD specific ugly hack to detect SysV services requiring network
 +                if (startswith_no_case(t, ". /etc/sysconfig/network")) {
-+                        r = unit_add_dependency_by_name(UNIT(s), UNIT_REQUIRES | UNIT_AFTER, "network.target", NULL, true);
-+
++                        r = strv_extend(&s->wants, "network.target");
 +                        if (r < 0)
-+                                 log_error("[%s:%u] Failed to add dependency on network.target, ignoring: %s", path, line, strerror(-r));
++                                 log_error("[%s:%u] Failed to add dependency on network.target, ignoring: %s", s->path, line, strerror(-r));
++                        r = strv_extend(&s->after, "network.target");
++                        if (r < 0)
++                                 log_error("[%s:%u] Failed to add dependency on network.target, ignoring: %s", s->path, line, strerror(-r));
 +                }
-                 if (*t != '#')
-                         continue;
+                 if (*t != '#') {
+                         /* Try to figure out whether this init script supports
+                          * the reload operation. This heuristic looks for
This page took 0.027519 seconds and 4 git commands to generate.