naccyde / rpms / systemd

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