All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/2] init fixes
@ 2015-03-19 10:52 Aníbal Limón
  2015-03-19 10:52 ` [PATCHv3 1/2] sysvinit-inittab: Fix no tty in runlevel 1 Aníbal Limón
  2015-03-19 10:52 ` [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels Aníbal Limón
  0 siblings, 2 replies; 6+ messages in thread
From: Aníbal Limón @ 2015-03-19 10:52 UTC (permalink / raw)
  To: openembedded-core

The next changes fixes issues related to [YOCTO #5336].

This v3 adds conditional installing of changetodefaultvt.sh into patch for initscripts.

The following changes since commit df0672b038e6942c97d266af9ca175a06f2b0423:

  bitbake: toaster: Fix the orderkey to match the column (2015-03-16 17:44:13 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib alimon/init_fixes
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=alimon/init_fixes

Aníbal Limón (2):
  sysvinit-inittab: Fix no tty in runlevel 1.
  initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels

 .../initscripts/initscripts-1.0/changetodefaultvt.sh           | 10 ++++++++++
 meta/recipes-core/initscripts/initscripts_1.0.bb               |  8 ++++++++
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb         |  2 +-
 3 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh

-- 
1.8.4.5



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

* [PATCHv3 1/2] sysvinit-inittab: Fix no tty in runlevel 1.
  2015-03-19 10:52 [PATCHv3 0/2] init fixes Aníbal Limón
@ 2015-03-19 10:52 ` Aníbal Limón
  2015-03-19 10:52 ` [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels Aníbal Limón
  1 sibling, 0 replies; 6+ messages in thread
From: Aníbal Limón @ 2015-03-19 10:52 UTC (permalink / raw)
  To: openembedded-core

When switch to runlevel 1 (Single user mode), tty was not
re-spawn and appears to be a machine hang.

[YOCTO #5336]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index eed2104..e087f0f 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -41,7 +41,7 @@ EOF
 
         for n in ${SYSVINIT_ENABLED_GETTYS}
         do
-            echo "$n:2345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab
+            echo "$n:12345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab
         done
         echo "" >> ${D}${sysconfdir}/inittab
     fi
-- 
1.8.4.5



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

* [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels
  2015-03-19 10:52 [PATCHv3 0/2] init fixes Aníbal Limón
  2015-03-19 10:52 ` [PATCHv3 1/2] sysvinit-inittab: Fix no tty in runlevel 1 Aníbal Limón
@ 2015-03-19 10:52 ` Aníbal Limón
  2015-03-19 19:04   ` Otavio Salvador
  1 sibling, 1 reply; 6+ messages in thread
From: Aníbal Limón @ 2015-03-19 10:52 UTC (permalink / raw)
  To: openembedded-core

When change between runlevel 5 to another non-graphic runlevel
the console stays in the tty where X was launched.

This patchs add a default switch to tty1.

[YOCTO #5336]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 .../initscripts/initscripts-1.0/changetodefaultvt.sh           | 10 ++++++++++
 meta/recipes-core/initscripts/initscripts_1.0.bb               |  8 ++++++++
 2 files changed, 18 insertions(+)
 create mode 100755 meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
new file mode 100755
index 0000000..bbef7ed
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
@@ -0,0 +1,10 @@
+#!/bin/sh 
+### BEGIN INIT INFO
+# Provides:             changetodefaultvt
+# Required-Start:
+# Required-Stop:
+# Default-Start:        1 2 3 4
+# Default-Stop:
+### END INIT INFO
+
+chvt 1
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index dfb75b2..177ab90 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -33,6 +33,7 @@ SRC_URI = "file://functions \
            file://GPLv2.patch \
            file://dmesg.sh \
            file://logrotate-dmesg.conf \
+           file://changetodefaultvt.sh \
 "
 
 S = "${WORKDIR}"
@@ -100,6 +101,9 @@ do_install () {
 	install -m 0644    ${WORKDIR}/volatiles		${D}${sysconfdir}/default/volatiles/00_core
 	install -m 0755    ${WORKDIR}/dmesg.sh		${D}${sysconfdir}/init.d
 	install -m 0644    ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
+		install -m 0755    ${WORKDIR}/changetodefaultvt.sh	${D}${sysconfdir}/init.d
+	fi
 
 	if [ "${TARGET_ARCH}" = "arm" ]; then
 		install -m 0755 ${WORKDIR}/alignment.sh	${D}${sysconfdir}/init.d
@@ -112,6 +116,10 @@ do_install () {
 #
 # Create runlevel links
 #
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
+		update-rc.d -r ${D} changetodefaultvt.sh start 99 1 2 3 4 .
+	fi
+
 	update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
 	update-rc.d -r ${D} sendsigs start 20 0 6 .
 	update-rc.d -r ${D} urandom start 30 S 0 6 .
-- 
1.8.4.5



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

* Re: [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels
  2015-03-19 10:52 ` [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels Aníbal Limón
@ 2015-03-19 19:04   ` Otavio Salvador
  2015-03-19 19:09     ` Aníbal Limón
  0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2015-03-19 19:04 UTC (permalink / raw)
  To: Aníbal Limón; +Cc: Patches and discussions about the oe-core layer

On Thu, Mar 19, 2015 at 7:52 AM, Aníbal Limón
<anibal.limon@linux.intel.com> wrote:
> When change between runlevel 5 to another non-graphic runlevel
> the console stays in the tty where X was launched.
>
> This patchs add a default switch to tty1.
>
> [YOCTO #5336]
>
> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
> ---
>  .../initscripts/initscripts-1.0/changetodefaultvt.sh           | 10 ++++++++++
>  meta/recipes-core/initscripts/initscripts_1.0.bb               |  8 ++++++++
>  2 files changed, 18 insertions(+)
>  create mode 100755 meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
> new file mode 100755
> index 0000000..bbef7ed
> --- /dev/null
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +### BEGIN INIT INFO
> +# Provides:             changetodefaultvt
> +# Required-Start:
> +# Required-Stop:
> +# Default-Start:        1 2 3 4
> +# Default-Stop:
> +### END INIT INFO
> +
> +chvt 1

You didn't answer the question. How general use distros are handling
this? It seems hackish!

> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index dfb75b2..177ab90 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -33,6 +33,7 @@ SRC_URI = "file://functions \
>             file://GPLv2.patch \
>             file://dmesg.sh \
>             file://logrotate-dmesg.conf \
> +           file://changetodefaultvt.sh \
>  "
>
>  S = "${WORKDIR}"
> @@ -100,6 +101,9 @@ do_install () {
>         install -m 0644    ${WORKDIR}/volatiles         ${D}${sysconfdir}/default/volatiles/00_core
>         install -m 0755    ${WORKDIR}/dmesg.sh          ${D}${sysconfdir}/init.d
>         install -m 0644    ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
> +       if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
> +               install -m 0755    ${WORKDIR}/changetodefaultvt.sh      ${D}${sysconfdir}/init.d
> +       fi
>
>         if [ "${TARGET_ARCH}" = "arm" ]; then
>                 install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
> @@ -112,6 +116,10 @@ do_install () {
>  #
>  # Create runlevel links
>  #
> +       if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
> +               update-rc.d -r ${D} changetodefaultvt.sh start 99 1 2 3 4 .
> +       fi
> +
>         update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
>         update-rc.d -r ${D} sendsigs start 20 0 6 .
>         update-rc.d -r ${D} urandom start 30 S 0 6 .
> --
> 1.8.4.5
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels
  2015-03-19 19:04   ` Otavio Salvador
@ 2015-03-19 19:09     ` Aníbal Limón
  2015-03-19 19:20       ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Aníbal Limón @ 2015-03-19 19:09 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

Hi,

On 19/03/15 13:04, Otavio Salvador wrote:
> On Thu, Mar 19, 2015 at 7:52 AM, Aníbal Limón
> <anibal.limon@linux.intel.com> wrote:
>> When change between runlevel 5 to another non-graphic runlevel
>> the console stays in the tty where X was launched.
>>
>> This patchs add a default switch to tty1.
>>
>> [YOCTO #5336]
>>
>> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
>> ---
>>   .../initscripts/initscripts-1.0/changetodefaultvt.sh           | 10 ++++++++++
>>   meta/recipes-core/initscripts/initscripts_1.0.bb               |  8 ++++++++
>>   2 files changed, 18 insertions(+)
>>   create mode 100755 meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>>
>> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>> new file mode 100755
>> index 0000000..bbef7ed
>> --- /dev/null
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>> @@ -0,0 +1,10 @@
>> +#!/bin/sh
>> +### BEGIN INIT INFO
>> +# Provides:             changetodefaultvt
>> +# Required-Start:
>> +# Required-Stop:
>> +# Default-Start:        1 2 3 4
>> +# Default-Stop:
>> +### END INIT INFO
>> +
>> +chvt 1
> You didn't answer the question. How general use distros are handling
> this? It seems hackish!
Yes, its like hackish this is handled by display manager but we don't 
have one in sato.

I think it need to by installed by xserver-nodm-init instead of here. 
I'll send another version.

     alimon
>
>> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
>> index dfb75b2..177ab90 100644
>> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
>> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
>> @@ -33,6 +33,7 @@ SRC_URI = "file://functions \
>>              file://GPLv2.patch \
>>              file://dmesg.sh \
>>              file://logrotate-dmesg.conf \
>> +           file://changetodefaultvt.sh \
>>   "
>>
>>   S = "${WORKDIR}"
>> @@ -100,6 +101,9 @@ do_install () {
>>          install -m 0644    ${WORKDIR}/volatiles         ${D}${sysconfdir}/default/volatiles/00_core
>>          install -m 0755    ${WORKDIR}/dmesg.sh          ${D}${sysconfdir}/init.d
>>          install -m 0644    ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
>> +       if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
>> +               install -m 0755    ${WORKDIR}/changetodefaultvt.sh      ${D}${sysconfdir}/init.d
>> +       fi
>>
>>          if [ "${TARGET_ARCH}" = "arm" ]; then
>>                  install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
>> @@ -112,6 +116,10 @@ do_install () {
>>   #
>>   # Create runlevel links
>>   #
>> +       if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'true', 'false', d)}; then
>> +               update-rc.d -r ${D} changetodefaultvt.sh start 99 1 2 3 4 .
>> +       fi
>> +
>>          update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
>>          update-rc.d -r ${D} sendsigs start 20 0 6 .
>>          update-rc.d -r ${D} urandom start 30 S 0 6 .
>> --
>> 1.8.4.5
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>



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

* Re: [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels
  2015-03-19 19:09     ` Aníbal Limón
@ 2015-03-19 19:20       ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2015-03-19 19:20 UTC (permalink / raw)
  To: Aníbal Limón; +Cc: Patches and discussions about the oe-core layer

On Thu, Mar 19, 2015 at 4:09 PM, Aníbal Limón
<anibal.limon@linux.intel.com> wrote:
> Hi,
>
>
> On 19/03/15 13:04, Otavio Salvador wrote:
>>
>> On Thu, Mar 19, 2015 at 7:52 AM, Aníbal Limón
>> <anibal.limon@linux.intel.com> wrote:
>>>
>>> When change between runlevel 5 to another non-graphic runlevel
>>> the console stays in the tty where X was launched.
>>>
>>> This patchs add a default switch to tty1.
>>>
>>> [YOCTO #5336]
>>>
>>> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
>>> ---
>>>   .../initscripts/initscripts-1.0/changetodefaultvt.sh           | 10
>>> ++++++++++
>>>   meta/recipes-core/initscripts/initscripts_1.0.bb               |  8
>>> ++++++++
>>>   2 files changed, 18 insertions(+)
>>>   create mode 100755
>>> meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>>>
>>> diff --git
>>> a/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>>> b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>>> new file mode 100755
>>> index 0000000..bbef7ed
>>> --- /dev/null
>>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/changetodefaultvt.sh
>>> @@ -0,0 +1,10 @@
>>> +#!/bin/sh
>>> +### BEGIN INIT INFO
>>> +# Provides:             changetodefaultvt
>>> +# Required-Start:
>>> +# Required-Stop:
>>> +# Default-Start:        1 2 3 4
>>> +# Default-Stop:
>>> +### END INIT INFO
>>> +
>>> +chvt 1
>>
>> You didn't answer the question. How general use distros are handling
>> this? It seems hackish!
>
> Yes, its like hackish this is handled by display manager but we don't have
> one in sato.
>
> I think it need to by installed by xserver-nodm-init instead of here. I'll
> send another version.

Now it starts to make some sense.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

end of thread, other threads:[~2015-03-19 19:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19 10:52 [PATCHv3 0/2] init fixes Aníbal Limón
2015-03-19 10:52 ` [PATCHv3 1/2] sysvinit-inittab: Fix no tty in runlevel 1 Aníbal Limón
2015-03-19 10:52 ` [PATCHv3 2/2] initscripts: Add changetodefaultvt for 1, 2, 3, 4 runlevels Aníbal Limón
2015-03-19 19:04   ` Otavio Salvador
2015-03-19 19:09     ` Aníbal Limón
2015-03-19 19:20       ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.