salimma / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
771b4bc
From b60b51b119d4927e73e230dd5546dce955b89640 Mon Sep 17 00:00:00 2001
771b4bc
From: Lennart Poettering <lennart@poettering.net>
771b4bc
Date: Thu, 12 Apr 2012 17:31:26 +0200
771b4bc
Subject: [PATCH] getty: skip VC gettys if the VC subsystem is not available
771b4bc
 (cherry picked from commit
771b4bc
 8ef58b3efcbafe062e0c2c2531839c1e583b81fd)
771b4bc
771b4bc
---
771b4bc
 units/getty@.service.m4 |    5 +++++
771b4bc
 1 file changed, 5 insertions(+)
771b4bc
771b4bc
diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
771b4bc
index 4588c56..5f16c21 100644
771b4bc
--- a/units/getty@.service.m4
771b4bc
+++ b/units/getty@.service.m4
771b4bc
@@ -33,6 +33,11 @@ After=rc-local.service
771b4bc
 Before=getty.target
771b4bc
 IgnoreOnIsolate=yes
771b4bc
 
771b4bc
+# On systems without virtual consoles, don't start any getty. (Note
771b4bc
+# that serial gettys are covered by serial-getty@.service, not this
771b4bc
+# unit
771b4bc
+ConditionPathExists=/dev/tty0
771b4bc
+
771b4bc
 [Service]
771b4bc
 Environment=TERM=linux
771b4bc
 ExecStart=-/sbin/agetty %I 38400