sysvinit-inittab_xen: Using getty wrapper to minimize console messages

Previously the following message was printed on the console every 5
minutes:
INIT: Id "X0" respawning too fast: disabled for 5 minutes

Installing and using a getty-wrapper that will check for the hypervisor
(hvc0) device and if not present, will call sleep

Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Jaewon Lee 2020-03-23 17:01:24 -07:00 committed by Bruce Ashfield
parent 540afb9d9d
commit f1e768dfdf
3 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,8 @@
#!/bin/sh
if test -c /dev/"$2"
then
exec /sbin/getty $*
else
exec sleep 3600d
fi

View File

@ -1 +1,11 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'sysvinit-inittab_xen.inc', '', d)}
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://getty-wrapper"
do_install_append() {
install -d ${D}${base_sbindir}
install -m 0755 ${WORKDIR}/getty-wrapper ${D}${base_sbindir}/getty-wrapper
}
FILES_${PN} += "${base_sbindir}/getty-wrapper"

View File

@ -1,4 +1,4 @@
do_install_append() {
echo "" >> ${D}${sysconfdir}/inittab
echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >> ${D}${sysconfdir}/inittab
echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
}