mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 09:32:11 +02:00
sysvinit-initab: rewrite loop to generate inittab
Instead of one-letter variables and arcane sed expressions, use English words and 'cut'. (From OE-Core rev: de9833792dd0cfac6f17d5c733c263b976e89cf6) (From OE-Core rev: c79f6e66283e506453d1643259d18e2d13eb10ea) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a4857688c3
commit
18a8d773c5
@@ -21,14 +21,14 @@ do_install() {
|
||||
install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty
|
||||
sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty
|
||||
|
||||
set -x
|
||||
tmp="${SERIAL_CONSOLES}"
|
||||
for i in $tmp
|
||||
CONSOLES="${SERIAL_CONSOLES}"
|
||||
for s in $CONSOLES
|
||||
do
|
||||
j=`echo ${i} | sed s/\;/\ /g`
|
||||
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} vt102" >> ${D}${sysconfdir}/inittab
|
||||
speed=$(echo $s | cut -d\; -f 1)
|
||||
device=$(echo $s | cut -d\; -f 2)
|
||||
label=$(echo $device | sed -e 's/tty//' | tail --bytes=5)
|
||||
|
||||
echo "$label:12345:respawn:${base_bindir}/start_getty $speed $device vt102" >> ${D}${sysconfdir}/inittab
|
||||
done
|
||||
|
||||
if [ "${USE_VT}" = "1" ]; then
|
||||
|
||||
Reference in New Issue
Block a user