Package: systemd / 230-7~bpo8+2

debian/don-t-try-to-start-autovt-units-when-not-running-wit.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Michael Stapelberg <stapelberg@debian.org>
Date: Sat, 21 Dec 2013 18:49:10 +0100
Subject: =?utf-8?q?don=E2=80=99t_try_to_start_autovt_units_when_not_runnin?=
 =?utf-8?q?g_with_systemd_as_pid_1?=

Closes: #726466
---
 src/login/logind-core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index cbf8d75..cc04920 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -33,6 +33,7 @@
 #include "terminal-util.h"
 #include "udev-util.h"
 #include "user-util.h"
+#include "sd-daemon.h"
 
 int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) {
         Device *d;
@@ -413,6 +414,11 @@ int manager_spawn_autovt(Manager *m, unsigned int vtnr) {
             vtnr != m->reserve_vt)
                 return 0;
 
+        /* It only makes sense to send a StartUnit call to systemd if this
+         * machine is actually booted with systemd. */
+        if (!sd_booted())
+                return 0;
+
         if (vtnr != m->reserve_vt) {
                 /* If this is the reserved TTY, we'll start the getty
                  * on it in any case, but otherwise only if it is not