From: Ignaz Forster Date: Tue, 6 Feb 2018 16:32:47 +0000 (+0100) Subject: Avoid executing emergency hooks twice X-Git-Tag: 047~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94f61235d760337fdef692fac5ead589e8f3ab0e;p=thirdparty%2Fdracut.git Avoid executing emergency hooks twice --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 675abf22a..99cb9dbc6 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -1084,6 +1084,7 @@ _emergency_shell() rm -f -- /.console_lock else debug_off + source_hook "$hook" echo /sbin/rdsosreport echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot' @@ -1136,7 +1137,6 @@ emergency_shell() echo ; echo warn "$*" - source_hook "$hook" echo _emergency_action=$(getarg rd.emergency) @@ -1147,6 +1147,7 @@ emergency_shell() if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then _emergency_shell $_rdshell_name else + source_hook "$hook" warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." [ -z "$_emergency_action" ] && _emergency_action=halt fi