X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=pld-sysv-network.patch;h=de285e210e32e907fa5f282fb6594b4040194f76;hb=e7b337b98b4388d3612b7cb5d5d101d49c5adff6;hp=08ae087c051aa00480a9ea99cca7739aa3436660;hpb=4828ecaf92f2185cfd8e42808f89679b807fd60d;p=packages%2Fsystemd.git
diff --git a/pld-sysv-network.patch b/pld-sysv-network.patch
index 08ae087..de285e2 100644
--- a/pld-sysv-network.patch
+++ b/pld-sysv-network.patch
@@ -1,29 +1,33 @@
---- 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 @@
+diff -dur -x '*.orig' systemd-218.orig/man/systemd.special.xml systemd-218/man/systemd.special.xml
+--- systemd-218.orig/man/systemd.special.xml 2014-12-05 01:26:51.000000000 +0100
++++ systemd-218/man/systemd.special.xml 2015-04-03 15:01:42.000000000 +0200
+@@ -910,6 +910,10 @@
+ After= for this target unit to all SysV
+ init script service units with an LSB header referring to
+ the $network facility.
++
++ PLD specific: also scripts with
++ . /etc/sysconfig/network
++ source line get the dependency.
+
+
+
+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 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", 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", path, line, strerror(-r));
++ log_error("[%s:%u] Failed to add dependency on network.target, ignoring: %s", s->path, line, strerror(-r));
+ }
- if (*t != '#')
- continue;
-
---- systemd-44/man/systemd.special.xml~ 2012-02-20 16:33:32.000000000 +0200
-+++ systemd-44/man/systemd.special.xml 2012-03-18 10:44:01.469494195 +0200
-@@ -324,6 +324,10 @@
- referring to the
- $network
- facility.
-+
-+ PLD specific: also scripts with
-+ . /etc/sysconfig/network
-+ source line get the dependency.
-
-
-
+ if (*t != '#') {
+ /* Try to figure out whether this init script supports
+ * the reload operation. This heuristic looks for