]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK
authorCalifornia Sullivan <california.l.sullivan@intel.com>
Thu, 4 Aug 2016 02:36:36 +0000 (19:36 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Aug 2016 09:45:32 +0000 (10:45 +0100)
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].

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb

index bdc3416aa9099736c11a5e94d2457b8cd3d0344e..f136ad821b032bb492b7862d57f4bd331e962ff1 100644 (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