aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-07-05 04:13:16 -0400
committerHongxu Jia <hongxu.jia@windriver.com>2019-07-06 11:29:51 +0800
commitee8aaf5bfa4a3d20195c73b5813f51b3380e8398 (patch)
tree54094fa0b17229f3a93dcd3df8ac6c267fd9fcdb
parent47b46a2ba5a419e29ff02387835b25eef5ea0bf2 (diff)
downloadmeta-anaconda-ee8aaf5bfa4a3d20195c73b5813f51b3380e8398.tar.gz
meta-anaconda-ee8aaf5bfa4a3d20195c73b5813f51b3380e8398.tar.bz2
meta-anaconda-ee8aaf5bfa4a3d20195c73b5813f51b3380e8398.zip
systemd_%.bbappend: clean up tty1 to fix racing
TTY1 has been reserved for anaconda, there is a racing with getty1, clean up it in system Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-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
}