Patchwork [1/1] sysvinit-inittab: start runlevel 5 after terminals

login
register
mail settings
Submitter Joe Slater
Date May 8, 2013, 8:11 p.m.
Message ID <1368043917-25050-1-git-send-email-jslater@windriver.com>
Download mbox | patch
Permalink /patch/49603/
State New
Headers show

Comments

Joe Slater - May 8, 2013, 8:11 p.m.
If xserver is started before getty is attached to
virtual terminals, the server might lose the ability
to accept keyboard input, so we go to runlevel 5 at the
very end of inittab.
---
 .../recipes-core/sysvinit/sysvinit-inittab/inittab |    4 +++-
 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |    6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/inittab b/meta/recipes-core/sysvinit/sysvinit-inittab/inittab
index 6abbdf4..519ae17 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab/inittab
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/inittab
@@ -24,7 +24,9 @@  l1:1:wait:/etc/init.d/rc 1
 l2:2:wait:/etc/init.d/rc 2
 l3:3:wait:/etc/init.d/rc 3
 l4:4:wait:/etc/init.d/rc 4
-l5:5:wait:/etc/init.d/rc 5
+#
+# go into runlevel 5 ONLY after starting getty's
+#
 l6:6:wait:/etc/init.d/rc 6
 # Normally not reached, but fallthrough in case of emergency.
 z6:6:respawn:/sbin/sulogin
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 23c284d..d4cb6b9 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -2,7 +2,7 @@  DESCRIPTION = "Inittab for sysvinit"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-PR = "r9"
+PR = "r10"
 
 SRC_URI = "file://inittab"
 
@@ -45,6 +45,10 @@  EOF
         done
         echo "" >> ${D}${sysconfdir}/inittab
     fi
+
+    # Going to runlevel 5 should be the last thing in inittab.
+    #
+    echo "l5:5:wait:/etc/init.d/rc 5" >> ${D}${sysconfdir}/inittab
 }
 
 pkg_postinst_${PN} () {