Patchwork [3/9] initramfs-framework: modify the fatal behaviour in init

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date June 16, 2014, 10:46 a.m.
Message ID <36c954849cf9e9c0c4885b3b300ae23ba883ad72.1402915083.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/73857/
State New
Headers show

Comments

Qi.Chen@windriver.com - June 16, 2014, 10:46 a.m.
When a fatal error occurs, we'd better drop into a shell instead of
having it sleep for 3600 seconds.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../initrdscripts/initramfs-framework/init         |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
index 95fa9fb..1e3c14c 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -56,10 +56,7 @@  debug() {
 fatal() {
     echo $1 >/dev/console
     echo >/dev/console
-
-	while [ "true" ]; do
-		sleep 3600
-	done
+    exec sh
 }
 
 # Variables shared amoung modules