Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] Fix hang issue when execute "shutdown now" command
@ 2012-07-10 20:00 Matthew McClintock
  2012-07-10 20:00 ` [PATCH 2/2] sysvinit-inittab.bb: fix up dynamically removed consoles Matthew McClintock
  2012-07-10 20:48 ` [PATCH 1/2] Fix hang issue when execute "shutdown now" command McClintock Matthew-B29882
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew McClintock @ 2012-07-10 20:00 UTC (permalink / raw)
  To: openembedded-core

From: Zhenhua Luo <b19537@freescale.com>

    The original issue:
    When "shutdown now" command is typed on Linux prompt, the system tries to
    shut down gracefully from runlevel 5 to 1.
    RunLevel 1 is single-user/maintenance mode. This is the default behavior
    when no runlevel option is mentioned in shutdown command (like shutdown
    -h now OR shutdown -r now).
    The startup script which starts single-user mode by initiating a new
    process is missing from /etc/rc1.d/...
    Because of this, following error appears:
        INIT: no more processes left in this runlevel
    A start-up script is needed to enables the user to log into single-user
    mode when "shutdown now" command is given.

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Zhenhua Luo <b19537@freescale.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb |    5 +++--
 1 file changed, 3 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 492c60c..fe1ff41 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 = "r7"
+PR = "r8"
 
 SRC_URI = "file://inittab"
 
@@ -26,7 +26,8 @@ do_install() {
     for i in $tmp
     do
 	j=`echo ${i} | sed s/\;/\ /g`
-        echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+	echo "${idx}:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+
 	idx=`expr $idx + 1`
     done
 
-- 
1.7.10





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] sysvinit-inittab.bb: fix up dynamically removed consoles
  2012-07-10 20:00 [PATCH 1/2] Fix hang issue when execute "shutdown now" command Matthew McClintock
@ 2012-07-10 20:00 ` Matthew McClintock
  2012-07-10 21:04   ` McClintock Matthew-B29882
  2012-07-10 20:48 ` [PATCH 1/2] Fix hang issue when execute "shutdown now" command McClintock Matthew-B29882
  1 sibling, 1 reply; 4+ messages in thread
From: Matthew McClintock @ 2012-07-10 20:00 UTC (permalink / raw)
  To: openembedded-core

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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Fix hang issue when execute "shutdown now" command
  2012-07-10 20:00 [PATCH 1/2] Fix hang issue when execute "shutdown now" command Matthew McClintock
  2012-07-10 20:00 ` [PATCH 2/2] sysvinit-inittab.bb: fix up dynamically removed consoles Matthew McClintock
@ 2012-07-10 20:48 ` McClintock Matthew-B29882
  1 sibling, 0 replies; 4+ messages in thread
From: McClintock Matthew-B29882 @ 2012-07-10 20:48 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

Ignore this... there is one patch before this one...

-M

On Tue, Jul 10, 2012 at 3:00 PM, Matthew McClintock <msm@freescale.com> wrote:
> From: Zhenhua Luo <b19537@freescale.com>
>
>     The original issue:
>     When "shutdown now" command is typed on Linux prompt, the system tries to
>     shut down gracefully from runlevel 5 to 1.
>     RunLevel 1 is single-user/maintenance mode. This is the default behavior
>     when no runlevel option is mentioned in shutdown command (like shutdown
>     -h now OR shutdown -r now).
>     The startup script which starts single-user mode by initiating a new
>     process is missing from /etc/rc1.d/...
>     Because of this, following error appears:
>         INIT: no more processes left in this runlevel
>     A start-up script is needed to enables the user to log into single-user
>     mode when "shutdown now" command is given.
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> Signed-off-by: Zhenhua Luo <b19537@freescale.com>
> ---
>  meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb |    5 +++--
>  1 file changed, 3 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 492c60c..fe1ff41 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 = "r7"
> +PR = "r8"
>
>  SRC_URI = "file://inittab"
>
> @@ -26,7 +26,8 @@ do_install() {
>      for i in $tmp
>      do
>         j=`echo ${i} | sed s/\;/\ /g`
> -        echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
> +       echo "${idx}:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
> +
>         idx=`expr $idx + 1`
>      done
>
> --
> 1.7.10
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] sysvinit-inittab.bb: fix up dynamically removed consoles
  2012-07-10 20:00 ` [PATCH 2/2] sysvinit-inittab.bb: fix up dynamically removed consoles Matthew McClintock
@ 2012-07-10 21:04   ` McClintock Matthew-B29882
  0 siblings, 0 replies; 4+ messages in thread
From: McClintock Matthew-B29882 @ 2012-07-10 21:04 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-10 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10 20:00 [PATCH 1/2] Fix hang issue when execute "shutdown now" command Matthew McClintock
2012-07-10 20:00 ` [PATCH 2/2] sysvinit-inittab.bb: fix up dynamically removed consoles Matthew McClintock
2012-07-10 21:04   ` McClintock Matthew-B29882
2012-07-10 20:48 ` [PATCH 1/2] Fix hang issue when execute "shutdown now" command McClintock Matthew-B29882

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox