]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysvinit-inittab: Fix getting tty device name from SERIAL_CONSOLES entries
authorMuhammad Shakeel <muhammad_shakeel@mentor.com>
Mon, 7 Oct 2013 15:05:04 +0000 (15:05 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 14 Oct 2013 15:54:27 +0000 (16:54 +0100)
Currently the part after "tty" in the device name go into label along with
everything after that part. For example if SERIAL_CONSOLES="115200;vt100;ttyS0"
than label=S0 but if SERIAL_CONSOLES="115200;ttyS0;vt100" than label=S0;vt100.
If SERIAL_CONSOLES="..;ttyX;..", part after 'X' should also be trimmed.

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb

index 23c284d131c3705ead84ebb238f7d1297974de63..05ba410441378a2c50cbae0c2597a488cb220db5 100644 (file)
@@ -22,7 +22,7 @@ do_install() {
     for i in $tmp
     do
        j=`echo ${i} | sed s/\;/\ /g`
-       label=`echo ${i} | sed -e 's/^.*;tty//'`
+       label=`echo ${i} | sed -e 's/^.*;tty//' -e 's/;.*//'`
        echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
     done