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