Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] busybox: Fix busybox-init on non-tty consoles
@ 2016-08-08  1:30 Stefan Agner
  2016-08-08  3:26 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2016-08-08  1:30 UTC (permalink / raw)
  To: openembedded-core

When using non-tty consoles (e.g. VirtIO console /dev/hvc0) the
current init system fails with:
process '/sbin/getty 115200 hvc0' (pid 545) exited. Scheduling for restart.
can't open /dev/ttyhvc0: No such file or directory

The first field needs to be a valid device. The BusyBox inittab example
explains as follows:
"<id>: WARNING: This field has a non-traditional meaning for BusyBox init!

The id field is used by BusyBox init to specify the controlling tty for
the specified process to run on.  The contents of this field are
appended to "/dev/" and used as-is."

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 meta/recipes-core/busybox/busybox.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 5e91a26..4765c28 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -286,8 +286,8 @@ do_install () {
                         for i in $tmp
                         do
                                 j=`echo ${i} | sed s/\;/\ /g`
-                                label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
-                                echo "tty$label::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+                                id=`echo ${i} | -e 's/^.*;//' -e 's/;.*//'`
+                                echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
                         done
                 fi
         fi
-- 
2.9.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-08  3:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08  1:30 [PATCH] busybox: Fix busybox-init on non-tty consoles Stefan Agner
2016-08-08  3:26 ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox