aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-core/systemd/files/0001-set-tty2-as-default-instance.patch27
-rw-r--r--recipes-core/systemd/systemd_%.bbappend11
2 files changed, 31 insertions, 7 deletions
diff --git a/recipes-core/systemd/files/0001-set-tty2-as-default-instance.patch b/recipes-core/systemd/files/0001-set-tty2-as-default-instance.patch
new file mode 100644
index 0000000..5a2e02a
--- /dev/null
+++ b/recipes-core/systemd/files/0001-set-tty2-as-default-instance.patch
@@ -0,0 +1,27 @@
+From 7af15e776418717b64da0eb66f9c920ddf5752ed Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 5 Jul 2019 03:19:44 -0400
+Subject: [PATCH] set tty2 as default instance
+
+TTY1 is reserved for anaconda
+
+Upstream-Status: Inappropriate [meta-anaconda specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ units/getty@.service.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
+index 80e793b..9707a20 100644
+--- a/units/getty@.service.m4
++++ b/units/getty@.service.m4
+@@ -57,4 +57,4 @@ UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETAR
+
+ [Install]
+ WantedBy=getty.target
+-DefaultInstance=tty1
++DefaultInstance=tty2
+--
+2.8.1
+
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index ad270db..56e2937 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -1,15 +1,12 @@
FILESEXTRAPATHS_prepend_anaconda := "${THISDIR}/files:"
+SRC_URI_append_anaconda = " \
+ file://0001-set-tty2-as-default-instance.patch \
+"
do_install_append_anaconda() {
# Explicitly enable tty2
ln -nsf ${systemd_unitdir}/system/getty@.service \
${D}${sysconfdir}/systemd/system/getty.target.wants/getty@tty2.service
- install -d ${D}${sysconfdir}/systemd/logind.conf.d
- echo "[Login]" >> ${D}${sysconfdir}/systemd/logind.conf.d/anaconda.conf
- # Disable VT reservation
- echo "NAutoVTs=0" >> ${D}${sysconfdir}/systemd/logind.conf.d/anaconda.conf
- # Disable automatic spawning of "autovt" services
- echo "ReserveVT=0" >> ${D}${sysconfdir}/systemd/logind.conf.d/anaconda.conf
-
+ rm -f ${D}${systemd_unitdir}/system/autovt@.service
}