]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysvinit-inittab: Run ttys on ttys that don't have tty in the name
authorRandy Witt <randy.e.witt@linux.intel.com>
Fri, 28 Aug 2015 02:40:18 +0000 (19:40 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 29 Aug 2015 12:18:17 +0000 (13:18 +0100)
On qemuarm64 the second serial port in SERIAL_CONSOLES will be hvc0.
Since that doesn't have tty in the name, a correct label didn't get
added to inittab.

This change makes both names with tty and without work.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb

index e087f0ff86e205feeec24d1ab93fdf72bdb5e796..49b1326a26d9b25ade276b3eb196c5d357fcb70f 100644 (file)
@@ -18,11 +18,12 @@ do_install() {
        install -d ${D}${sysconfdir}
     install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
 
+    set -x
     tmp="${SERIAL_CONSOLES}"
     for i in $tmp
     do
        j=`echo ${i} | sed s/\;/\ /g`
-       label=`echo ${i} | sed -e 's/^.*;tty//' -e 's/;.*//'`
+       label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
        echo "$label:12345:respawn:${base_sbindir}/getty -L ${j}" >> ${D}${sysconfdir}/inittab
     done