ryantimwilson / rpms / systemd

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