Skip to contentSkip to conversation

do emergency_shell in die() if rd.debug=1

PATCH In review Will Woods 2 participants 2 messages May 22, 2012 – May 29, 2012 1 message not in the archive

lore
Share & tools
lore

Will Woods

author
#0 lore raw

PATCH 2/2 do emergency_shell in die() if rd.debug=1

If I said 'rd.debug=1' I should get to debug the system before it dies, right?

---
 modules.d/99base/dracut-lib.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
modules.d/99base/dracut-lib.sh +2 -1
index 19aceb8..ef50af8 100755
@@ -307,6 +307,7 @@ die() {
     } >> $hookdir/emergency/01-die.sh
 
     > /run/initramfs/.die
+    emergency_shell
     exit 1
 }
 
@@ -825,7 +826,6 @@ emergency_shell()
     warn $@
     source_hook "$hook"
     echo
-    [ -e /run/initramfs/.die ] && exit 1
     if getargbool 1 rd.shell -y rdshell || getarg rd.break rdbreak; then
         echo "Dropping to debug shell."
         echo
@@ -849,6 +849,7 @@ emergency_shell()
         # cause a kernel panic
         exit 1
     fi
+    [ -e /run/initramfs/.die ] && exit 1
 }
 
 # Retain the values of these variables but ensure that they are unexported
Signature · 1 line
1.7.10.1
#2 lore raw
In reply to a message not in the archive

Am 23.05.2012 00:16, schrieb Will Woods:

Quoted 5 lines

If I said 'rd.debug=1' I should get to debug the system before it dies, right?

---
 modules.d/99base/dracut-lib.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

pushed