summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-24 15:33:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-02 17:40:51 +0100
commit28d3202befcec72554885f8ea9cb7985523b89f5 (patch)
tree13e4cc60cdee5312cfd31440350afc26b23b794b /meta/recipes-core/sysvinit
parentbdcc5e8f1286d288baf410458efc39a59b68d751 (diff)
downloadopenembedded-core-contrib-28d3202befcec72554885f8ea9cb7985523b89f5.tar.gz
openembedded-core-contrib-28d3202befcec72554885f8ea9cb7985523b89f5.tar.bz2
openembedded-core-contrib-28d3202befcec72554885f8ea9cb7985523b89f5.zip
sysvinit-inittab: ensure unique label for SERIAL_CONSOLES entries
The label field in /etc/inittab entries needs to be unique, and the numeric label being used for the SERIAL_CONSOLES getty entries was clashing with the entries added for standard ttyX entries added via SYSVINIT_ENABLED_GETTYS. Use the part after "tty" in the device name (which is what the comment further down explicitly says should be done) as the label rather than a simple incrementing number. Fixes [YOCTO #4374]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/sysvinit')
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb6
1 files changed, 2 insertions, 4 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index b28985314f..fbac8937fe 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -21,14 +21,12 @@ do_install() {
echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
fi
- idx=0
tmp="${SERIAL_CONSOLES}"
for i in $tmp
do
j=`echo ${i} | sed s/\;/\ /g`
- echo "${idx}:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
-
- idx=`expr $idx + 1`
+ label=`echo ${i} | sed -e 's/^.*;tty//'`
+ echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
done
if [ "${USE_VT}" = "1" ]; then