[oe-commits] [openembedded-core] 13/13: run-postinsts: Fix full execution of scripts at first boot

git at git.openembedded.org git at git.openembedded.org
Sun May 12 08:11:36 UTC 2019


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

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

commit 706410c847ac9c89317d098de5d5c580736edbbb
Author: Alejandro Enedino Hernandez Samaniego <alejandr at xilinx.com>
AuthorDate: Wed May 8 12:04:01 2019 -0700

    run-postinsts: Fix full execution of scripts at first boot
    
    run-postinsts runs a given set of scripts during the first boot of the
    device, when one of these scripts prints something to stdout (isnt
    daemonized correctly), since stdout is not available at that time,
    the script execution immediately returns with an error (exit_group()),
    this error causes the script to terminate all threads within the process,
    causing undesired behavior since the script might still had to execute
    some other code.
    
    Replace eval built-in with (), since () executes in a subshell,
    even if one of the scripts exits, all threads of that process will only
    be within that session, this ensures other scripts meant to be run are
    still run afterwards.
    
    [YOCTO #13266]
    
    Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr at xilinx.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 95eff04..f84a7e1 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -67,7 +67,7 @@ exec_postinst_scriptlets() {
 		echo "Running postinst $i..."
 		[ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log
 		if [ -x $i ]; then
-			eval sh -c $i $append_log
+			(sh -c $i $append_log)
 			rm $i
 		else
 			echo "ERROR: postinst $i failed."

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


More information about the Openembedded-commits mailing list