All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sysvinit-inittab: restrict labels to 4 chars
@ 2016-04-29  3:01 Stephano Cetola
  0 siblings, 0 replies; only message in thread
From: Stephano Cetola @ 2016-04-29  3:01 UTC (permalink / raw)
  To: openembedded-core

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 ]

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index c5b8cdc..bdc3416 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -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
 
-- 
2.8.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-29  3:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29  3:01 [PATCH] sysvinit-inittab: restrict labels to 4 chars Stephano Cetola

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.