mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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]. (From OE-Core rev: 28d3202befcec72554885f8ea9cb7985523b89f5) (From OE-Core rev: d3393e28c5d6aa8a8bab754574ec68e540269a1c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f5bfb120dd
commit
1633edffc7
@@ -21,14 +21,12 @@ do_install() {
|
|||||||
echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
|
echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
|
||||||
fi
|
fi
|
||||||
|
|
||||||
idx=0
|
|
||||||
tmp="${SERIAL_CONSOLES}"
|
tmp="${SERIAL_CONSOLES}"
|
||||||
for i in $tmp
|
for i in $tmp
|
||||||
do
|
do
|
||||||
j=`echo ${i} | sed s/\;/\ /g`
|
j=`echo ${i} | sed s/\;/\ /g`
|
||||||
echo "${idx}:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
|
label=`echo ${i} | sed -e 's/^.*;tty//'`
|
||||||
|
echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
|
||||||
idx=`expr $idx + 1`
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "${USE_VT}" = "1" ]; then
|
if [ "${USE_VT}" = "1" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user