summaryrefslogtreecommitdiff
path: root/src/sysv-generator/sysv-generator.c
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-07-23 12:49:14 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-07-30 09:55:35 +0200
commit805b573fad06b845502e76f3db3a0efa7583149d (patch)
tree94ed651fc5ac6d17272eae19976ceb8d4e8fcbc0 /src/sysv-generator/sysv-generator.c
parentbc07548926ec5ed7b13df8d3656654f238e0b9a7 (diff)
sysv: order initscripts which provide $network before network.target
Due to recent changes where $network "maps" to network-online.target it is not guaranteed that initscript which provides networking will be terminated after network.target during shutdown which is against LSB.
Diffstat (limited to 'src/sysv-generator/sysv-generator.c')
-rw-r--r--src/sysv-generator/sysv-generator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 5206279384..9a869badca 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -482,6 +482,11 @@ static int load_sysv(SysvStub *s) {
r = strv_extend(&s->wants, m);
if (r < 0)
return log_oom();
+ if (streq(m, SPECIAL_NETWORK_ONLINE_TARGET)) {
+ r = strv_extend(&s->before, SPECIAL_NETWORK_TARGET);
+ if (r < 0)
+ return log_oom();
+ }
}
if (r < 0)