[OE-core] [PATCH] run-postinsts: Fix full execution of scripts at first boot

Richard Purdie richard.purdie at linuxfoundation.org
Fri Apr 26 08:15:30 UTC 2019


On Fri, 2019-04-19 at 14:47 -0700, Alejandro Enedino Hernandez
Samaniego wrote:
> 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 different
> shell,
> 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.
> 
> This was only required on the line that actually executes the
> scripts:
> "eval sh -c $i $append_log", other replacements were put for
> consistency,
> and generally, it is recommended to use $() instead of eval anyway.
> 
> [YOCTO #13266]
> 
> Signed-off-by: Alejandro Enedino Hernandez Samaniego <
> alejandr at xilinx.com>

This seems to cause:

oe-selftest -r runtime_test.Postinst.test_postinst_rootfs_and_boot

to fail:

https://autobuilder.yoctoproject.org/typhoon/#/builders/56/builds/429

(both on the autobuilder and locally)

Cheers,

Richard





More information about the Openembedded-core mailing list