From: Patrick Ohly Date: Mon, 7 Sep 2015 11:16:38 +0000 (+0200) Subject: initramfs-framework: support dropping into shell on failure X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~28955 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d3dc681e809846dba7cae4f81566045a3f8c205;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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... Signed-off-by: Patrick Ohly Signed-off-by: Ross Burton --- diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init index e8f4713b521..9291ad5c219 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/init +++ b/meta/recipes-core/initrdscripts/initramfs-framework/init @@ -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