ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
803fb7
From 1649dac4656e8056e5fe5fa99e5753257efe1a42 Mon Sep 17 00:00:00 2001
803fb7
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nykr=C3=BDn?= <lnykryn@redhat.com>
803fb7
Date: Thu, 30 Mar 2017 11:12:50 +0200
803fb7
Subject: [PATCH] sysv-generator: Provides: $network should also pull
803fb7
 network.target to transaction (#5652)
803fb7
803fb7
network.target should be pulled in to the transaction
803fb7
by the unit that provides network services, but currently
803fb7
for initscripts it only pulls in network-online.target.
803fb7
803fb7
Cherry-picked from: bd9ad4ff5bf2252f46ccf0cb91b3ed16def1c1a4
803fb7
Resolves: #1438749
803fb7
---
803fb7
 src/sysv-generator/sysv-generator.c | 3 +++
803fb7
 1 file changed, 3 insertions(+)
803fb7
803fb7
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
803fb7
index 7e0e7fc28..fe6fae151 100644
803fb7
--- a/src/sysv-generator/sysv-generator.c
803fb7
+++ b/src/sysv-generator/sysv-generator.c
803fb7
@@ -500,6 +500,9 @@ static int load_sysv(SysvStub *s) {
803fb7
                                                         r = strv_extend(&s->before, SPECIAL_NETWORK_TARGET);
803fb7
                                                         if (r < 0)
803fb7
                                                                 return log_oom();
803fb7
+                                                        r = strv_extend(&s->wants, SPECIAL_NETWORK_TARGET);
803fb7
+                                                        if (r < 0)
803fb7
+                                                                return log_oom();
803fb7
                                                 }
803fb7
                                         }
803fb7