summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/run-postinsts
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>2019-05-08 12:04:01 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-12 09:04:26 +0100
commit9f1b36f41deb5cc660856f52d74b54053f488d0a (patch)
tree5d6f6a20abec6f61c8b2640a7879e7d91251778a /meta/recipes-devtools/run-postinsts
parent25c91cf7e905fd37c95e60e150468074feaa16a6 (diff)
downloadpoky-9f1b36f41deb5cc660856f52d74b54053f488d0a.tar.gz
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] (From OE-Core rev: 706410c847ac9c89317d098de5d5c580736edbbb) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/run-postinsts')
-rwxr-xr-xmeta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 95eff04e17..f84a7e18c8 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() {
67 echo "Running postinst $i..." 67 echo "Running postinst $i..."
68 [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log 68 [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log
69 if [ -x $i ]; then 69 if [ -x $i ]; then
70 eval sh -c $i $append_log 70 (sh -c $i $append_log)
71 rm $i 71 rm $i
72 else 72 else
73 echo "ERROR: postinst $i failed." 73 echo "ERROR: postinst $i failed."