From: Will Woods Date: Tue, 22 May 2012 22:16:12 +0000 (-0400) Subject: do emergency_shell in die() if rd.debug=1 X-Git-Tag: 019~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78274fe2b44f6f355d47da547922e9d2522a6312;p=thirdparty%2Fdracut.git 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? --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 8bd18a0d2..3ecba9add 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -307,6 +307,7 @@ die() { } >> $hookdir/emergency/01-die.sh > /run/initramfs/.die + emergency_shell exit 1 } @@ -814,7 +815,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 @@ -838,6 +838,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