sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK

With some hardware the name of the device node and the name in
/proc/console differ. This causes SERIAL_CONSOLES_CHECK to not enable
working consoles in these cases. This patch changes SERIAL_CONSOLES_CHECK
to have an optional alias for the checked consoles. The new format is:

<device>:<alias to check(optional)>

Fixes [YOCTO #9440].

(From OE-Core rev: 91d9f3271c12fb755ab332637b17650d5fe75ce2)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
California Sullivan 2016-08-03 19:36:36 -07:00 committed by Richard Purdie
parent 95403e3ecd
commit da72327ab0
1 changed files with 5 additions and 2 deletions

View File

@ -58,9 +58,12 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
tmp="${SERIAL_CONSOLES_CHECK}"
for i in $tmp
do
j=`echo ${i} | sed s/^.*\;//g`
j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g`
k=`echo ${i} | sed s/^.*\://g`
if [ -z "`grep ${j} /proc/consoles`" ]; then
sed -i /^.*${j}$/d /etc/inittab
if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
sed -i /^.*${j}$/d /etc/inittab
fi
fi
done
kill -HUP 1