Blame SOURCES/0147-LSB-always-add-network-online.target-to-services-wit.patch

17b0f1
From 47ad778fc50382b916683a628b3f6f62754cc17d Mon Sep 17 00:00:00 2001
17b0f1
From: Lukas Nykryn <lnykryn@redhat.com>
17b0f1
Date: Wed, 13 May 2015 15:20:30 +0200
17b0f1
Subject: [PATCH] LSB: always add network-online.target to services with
17b0f1
 priority over 10
17b0f1
17b0f1
rhel-only
17b0f1
17b0f1
Resolves: #1189253
17b0f1
---
17b0f1
 src/sysv-generator/sysv-generator.c | 7 +++++++
17b0f1
 1 file changed, 7 insertions(+)
17b0f1
17b0f1
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
17b0f1
index 0125ca27d9..cfc4a99e4a 100644
17b0f1
--- a/src/sysv-generator/sysv-generator.c
17b0f1
+++ b/src/sysv-generator/sysv-generator.c
17b0f1
@@ -692,6 +692,13 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
17b0f1
         if (s->sysv_start_priority < 0)
17b0f1
                 return 0;
17b0f1
 
17b0f1
+        /* RHEL-only, services with more than 10 should be start after network */
17b0f1
+        if (s->sysv_start_priority > 10) {
17b0f1
+                r = strv_extend(&s->after, SPECIAL_NETWORK_ONLINE_TARGET);
17b0f1
+                if (r < 0)
17b0f1
+                        return log_oom();
17b0f1
+        }
17b0f1
+
17b0f1
         HASHMAP_FOREACH(other, all_services, j) {
17b0f1
                 if (s == other)
17b0f1
                         continue;