Skip to contentSkip to conversation

sysvinit-inittab: restrict labels to 4 chars

PATCH New Stephano Cetola 1 participant 1 message Apr 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysvinit-inittab: restrict labels to 4 chars

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 ]

---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +2 -1
index c5b8cdc..bdc3416 100644
@@ -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
 
Signature · 1 line
2.8.0