[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1768/8267] sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK



commit da72327ab03cbbb72ce999a167e7e3b4b4aa736a
Author: California Sullivan <california l sullivan intel com>
Date:   Wed Aug 3 19:36:36 2016 -0700

    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>

 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb 
b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index bdc3416..f136ad8 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]