]> git.pld-linux.org Git - packages/systemd.git/blame_incremental - pld-sysv-network.patch
- partial update to 238; target-pld.patch hostname parsing needs testing; files secti...
[packages/systemd.git] / pld-sysv-network.patch
... / ...
CommitLineData
1diff -dur -x '*.orig' systemd-218.orig/man/systemd.special.xml systemd-218/man/systemd.special.xml
2--- systemd-218.orig/man/systemd.special.xml 2014-12-05 01:26:51.000000000 +0100
3+++ systemd-218/man/systemd.special.xml 2015-04-03 15:01:42.000000000 +0200
4@@ -910,6 +910,10 @@
5 <varname>After=</varname> for this target unit to all SysV
6 init script service units with an LSB header referring to
7 the <literal>$network</literal> facility.</para>
8+
9+ <para>PLD specific: also scripts with
10+ <literal>. /etc/sysconfig/network</literal>
11+ source line get the dependency.</para>
12 </listitem>
13 </varlistentry>
14 <varlistentry>
15diff -dur -x '*.orig' systemd-218.orig/src/sysv-generator/sysv-generator.c systemd-218/src/sysv-generator/sysv-generator.c
16--- systemd-218.orig/src/sysv-generator/sysv-generator.c 2014-12-05 01:26:51.000000000 +0100
17+++ systemd-218/src/sysv-generator/sysv-generator.c 2015-04-03 15:02:21.000000000 +0200
18@@ -325,6 +325,15 @@
19 line++;
20
21 t = strstrip(l);
22+ // PLD specific ugly hack to detect SysV services requiring network
23+ if (startswith_no_case(t, ". /etc/sysconfig/network")) {
24+ r = strv_extend(&s->wants, "network.target");
25+ if (r < 0)
26+ log_error("[%s:%u] Failed to add dependency on network.target, ignoring: %s", s->path, line, strerror(-r));
27+ r = strv_extend(&s->after, "network.target");
28+ if (r < 0)
29+ log_error("[%s:%u] Failed to add dependency on network.target, ignoring: %s", s->path, line, strerror(-r));
30+ }
31 if (*t != '#') {
32 /* Try to figure out whether this init script supports
33 * the reload operation. This heuristic looks for
This page took 0.056931 seconds and 4 git commands to generate.