anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0226-core-handle-log-target-null-when-calling-systemd-shu.patch

1ff636
From ce82f7886b2326a507d523dcf459be4ab7fd8eb1 Mon Sep 17 00:00:00 2001
1ff636
From: =?UTF-8?q?Iago=20L=C3=B3pez=20Galeiras?= <iago@endocode.com>
1ff636
Date: Tue, 30 Jun 2015 15:08:49 +0200
1ff636
Subject: [PATCH] core: handle --log-target=null when calling systemd-shutdown
1ff636
1ff636
When shutting down, if systemd was started with --log-target=null,
1ff636
systemd-shutdown was being called with --log-target=console.
1ff636
1ff636
(cherry picked from commit 10f00ff17b9c9b55dc77c99797d27cb819fa5fdf)
1ff636
1ff636
Cherry-picked from: 10f00ff
1ff636
Resolves: #1222517
1ff636
---
1ff636
 src/core/main.c | 4 ++++
1ff636
 1 file changed, 4 insertions(+)
1ff636
1ff636
diff --git a/src/core/main.c b/src/core/main.c
c62b8e
index fd527d4d63..1c8d67dac2 100644
1ff636
--- a/src/core/main.c
1ff636
+++ b/src/core/main.c
1ff636
@@ -2001,6 +2001,10 @@ finish:
1ff636
                         command_line[pos++] = "kmsg";
1ff636
                         break;
1ff636
 
1ff636
+                case LOG_TARGET_NULL:
1ff636
+                        command_line[pos++] = "null";
1ff636
+                        break;
1ff636
+
1ff636
                 case LOG_TARGET_CONSOLE:
1ff636
                 default:
1ff636
                         command_line[pos++] = "console";