572a44
From d87f3874bac62d012ff5e573c2b803b3244a02da Mon Sep 17 00:00:00 2001
572a44
From: Hendrik Brueckner <brueckner@redhat.com>
572a44
Date: Fri, 31 Jan 2014 17:08:37 +0100
572a44
Subject: [PATCH] s390/getty-generator: initialize essential system
572a44
 terminals/consoles
572a44
572a44
Ensure to start getty programs on all essential system consoles on Linux on
572a44
System z.  Add these essential devices to the list of virtualization_consoles
572a44
to always generate getty configurations.
572a44
572a44
For the sake of completion, the list of essential consoles is:
572a44
572a44
  /dev/sclp_line0 - Operating system messages applet (LPAR)
572a44
  /dev/ttysclp0 - Integrated ASCII console applet (z/VM and LPAR)
572a44
  /dev/ttyS0 - Already handled by systemd (3215 console on z/VM)
572a44
  /dev/hvc0  - Already handled by systemd (IUCV HVC terminal on z/VM)
572a44
572a44
Depending on the environment, z/VM or LPAR, only a subset of these terminals
572a44
are available.
572a44
572a44
See also RH BZ 860158[1] "Cannot login via Operating System Console into RHEL7
572a44
instance installed on a LPAR".  This bugzilla actually blocks the installation
572a44
of Linux on System z instances in LPAR mode.
572a44
572a44
[1] https://bugzilla.redhat.com/show_bug.cgi?id=860158
572a44
---
572a44
 rules/99-systemd.rules.in             | 2 +-
572a44
 src/getty-generator/getty-generator.c | 4 +++-
572a44
 2 files changed, 4 insertions(+), 2 deletions(-)
572a44
572a44
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
572a44
index 307f18f..0e0a567 100644
572a44
--- a/rules/99-systemd.rules.in
572a44
+++ b/rules/99-systemd.rules.in
572a44
@@ -7,7 +7,7 @@
572a44
 
572a44
 ACTION=="remove", GOTO="systemd_end"
572a44
 
572a44
-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*", TAG+="systemd"
572a44
+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*", TAG+="systemd"
572a44
 
572a44
 KERNEL=="vport*", TAG+="systemd"
572a44
 
572a44
diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c
572a44
index 6c93806..40374b5 100644
572a44
--- a/src/getty-generator/getty-generator.c
572a44
+++ b/src/getty-generator/getty-generator.c
572a44
@@ -91,7 +91,9 @@ int main(int argc, char *argv[]) {
572a44
         static const char virtualization_consoles[] =
572a44
                 "hvc0\0"
572a44
                 "xvc0\0"
572a44
-                "hvsi0\0";
572a44
+                "hvsi0\0"
572a44
+                "sclp_line0\0"
572a44
+                "ttysclp0\0";
572a44
 
572a44
         int r = EXIT_SUCCESS;
572a44
         char *active;