valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

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

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