]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysvinit-inittab: restrict labels to 4 chars
authorStephano Cetola <stephano.cetola@linux.intel.com>
Fri, 29 Apr 2016 03:01:56 +0000 (20:01 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 29 Jun 2016 18:33:23 +0000 (19:33 +0100)
The current recipe creates inittab labels based off the device node name
of TTYs used as consoles. If those names exceed the 4 character label
limit of inittab, it will break. This change takes the last 4 chars of
the device names in order to avoid any errors.

[ YOCTO #9529 ]

(From OE-Core rev: 30acc7a6b9e6d1c42ba1df6e5a362d10b43cb4eb)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb

index c5b8cdca95a783d100bf601a1a39cf62b1f5cd54..bdc3416aa9099736c11a5e94d2457b8cd3d0344e 100644 (file)
@@ -26,7 +26,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/;.*//'`
+       l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
+       label=`echo $l | sed 's/.*\(....\)/\1/'`
        echo "$label:12345:respawn:${base_bindir}/start_getty ${j}" >> ${D}${sysconfdir}/inittab
     done