[oe-commits] [openembedded-core] 37/43: sysvinit-inittab: do not use 'exit 1' to postpone to first boot

git at git.openembedded.org git at git.openembedded.org
Fri Jun 15 10:40:05 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo-next
in repository openembedded-core.

commit 89911f364c4098505f00c61eb6a2fb2330bb174b
Author: Alexander Kanavin <alexander.kanavin at linux.intel.com>
AuthorDate: Mon May 28 22:54:54 2018 -0700

    sysvinit-inittab: do not use 'exit 1' to postpone to first boot
    
    Instead, first check if we need to do anything at all during first boot,
    and if so, either postpone to first boot via pkg_postinst_ontarget()
    when running on host, or run the necessary setup code when running on target.
    
    (From OE-Core rev: 16df1717c3813ba773e0dfa2d1db471816d8b99b)
    
    This is a backport from master
    
    Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 5b9c422..8585a41 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -53,8 +53,15 @@ EOF
 }
 
 pkg_postinst_${PN} () {
+# run this on host and on target
+if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
+       exit 0
+fi
+}
+
+pkg_postinst_ontarget_${PN} () {
 # run this on the target
-if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
+if [ -e /proc/consoles ]; then
 	tmp="${SERIAL_CONSOLES_CHECK}"
 	for i in $tmp
 	do
@@ -68,11 +75,7 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
 	done
 	kill -HUP 1
 else
-	if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
-		exit 0
-	else
-		exit 1
-	fi
+	exit 1
 fi
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list