anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

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

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