]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
busybox: Fix busybox-init on non-tty consoles
authorStefan Agner <stefan@agner.ch>
Mon, 8 Aug 2016 05:47:28 +0000 (22:47 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Aug 2016 09:45:33 +0000 (10:45 +0100)
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>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/busybox/busybox.inc

index 5e91a263ddf96d878d31d99d35829cd5647af53e..39c2eef082d5fa8ce9a51dd480eafa57eec53949 100644 (file)
@@ -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} | sed -e 's/^.*;//' -e 's/;.*//'`
+                                echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
                         done
                 fi
         fi