initramfs-framework: support dropping into shell on failure

When the init_fatal_sh boot parameter is present (i.e. used without
value) and a fatal problem occurs inside the initramfs-module, a shell
will be started instead of looping forever.

Useful for debugging.

Interestingly enough, the code was already indented to support such an
if check...

(From OE-Core rev: 1d3dc681e809846dba7cae4f81566045a3f8c205)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Patrick Ohly
2015-09-07 13:16:38 +02:00
committed by Richard Purdie
parent 04f4ef9766
commit 08ec92a04e

View File

@@ -58,9 +58,13 @@ fatal() {
echo $1 >/dev/console
echo >/dev/console
if [ -n "bootparam_init_fatal_sh" ]; then
sh
else
while [ "true" ]; do
sleep 3600
done
fi
}
# Variables shared amoung modules