From 049712038da250f1436373ae62e2d611f1edfb49 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Mon, 15 Feb 2010 16:19:04 +0100 Subject: If we could not mount the real root device, or the init program did not exist on it, bail out instead of panicing In these cases, we will exec /bin/sh, such that manual recovery is still possible as sh has PID 1 An expert might be able to mount and switch_root manually. In any case, this is less scary than a panic and a useless trace. --- init_functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'init_functions') diff --git a/init_functions b/init_functions index c0f10e9..72bf6ae 100644 --- a/init_functions +++ b/init_functions @@ -23,5 +23,7 @@ poll_device() { } launch_interactive_shell() { - PS1='[ramfs \W]\$ ' /bin/sh -i + PS1='[ramfs \W]\$ ' + [ "$1" = "--exec" ] && exec /bin/sh -i + /bin/sh -i } -- cgit v1.2.3-24-g4f1b