Patchwork [2/2] sysvinit-inittab.bb: fix up dynamically removed consoles

login
register
mail settings
Submitter Matthew McClintock
Date July 10, 2012, 8 p.m.
Message ID <1341950440-19009-2-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/31715/
State Rejected
Headers show

Comments

Matthew McClintock - July 10, 2012, 8 p.m.
Using dmesg could result in removing all the serial consoles as the
dmesg buffer might get filled up and erase the info we are looking
for. Instead let's look at /proc/consoles

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
McClintock Matthew-B29882 - July 10, 2012, 9:04 p.m.
Ignore this one too, sorry.

-M

On Tue, Jul 10, 2012 at 3:00 PM, Matthew McClintock <msm@freescale.com> wrote:
> Using dmesg could result in removing all the serial consoles as the
> dmesg buffer might get filled up and erase the info we are looking
> for. Instead let's look at /proc/consoles
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
>  meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb |    4 ++--
>  1 file changed, 2 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 fe1ff41..fae3cac 100644
> --- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> @@ -2,7 +2,7 @@ DESCRIPTION = "Inittab for sysvinit"
>  LICENSE = "GPLv2"
>  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
>
> -PR = "r8"
> +PR = "r9"
>
>  SRC_URI = "file://inittab"
>
> @@ -59,7 +59,7 @@ if [ "x$D" == "x" ]; then
>         for i in $tmp
>         do
>                 j=`echo ${i} | sed s/^.*\;//g`
> -               if [ -z "`dmesg | grep ${j}`" ]; then
> +               if [ -z "`cat /proc/consoles | grep ${j}`" ]; then
>                         sed -i /^.*${j}$/d /etc/inittab
>                 fi
>         done
> --
> 1.7.10
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index fe1ff41..fae3cac 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -2,7 +2,7 @@  DESCRIPTION = "Inittab for sysvinit"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-PR = "r8"
+PR = "r9"
 
 SRC_URI = "file://inittab"
 
@@ -59,7 +59,7 @@  if [ "x$D" == "x" ]; then
 	for i in $tmp
 	do
 		j=`echo ${i} | sed s/^.*\;//g`
-		if [ -z "`dmesg | grep ${j}`" ]; then
+		if [ -z "`cat /proc/consoles | grep ${j}`" ]; then
 			sed -i /^.*${j}$/d /etc/inittab
 		fi
 	done