Use /lib/dracut/no-emergency-shell to control action on fail
Currently when action_on_fail is enabled, the emergency_shell won't be called either. In kdump even though user specify the default action as emergency_shell, dracut still skip it. Now change the implementation of action_on_fail to depend on a file which is created by kdump when making kdump initrd, then remove it at the beginning of kdump. This can solve the explicit emergency_shell problem. Signed-off-by: Baoquan He <bhe@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: WANG Chao <chaowang@redhat.com>
This commit is contained in:
parent
070a561da5
commit
cc4abf52c9
@ -3,6 +3,10 @@
|
|||||||
exec &> /dev/console
|
exec &> /dev/console
|
||||||
. /lib/dracut-lib.sh
|
. /lib/dracut-lib.sh
|
||||||
|
|
||||||
|
if [ -f "$initdir/lib/dracut/no-emergency-shell" ]; then
|
||||||
|
rm -f -- $initdir/lib/dracut/no-emergency-shell
|
||||||
|
fi
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
KDUMP_PATH="/var/crash"
|
KDUMP_PATH="/var/crash"
|
||||||
CORE_COLLECTOR=""
|
CORE_COLLECTOR=""
|
||||||
|
@ -400,6 +400,8 @@ kdump_check_iscsi_targets () {
|
|||||||
|
|
||||||
install() {
|
install() {
|
||||||
kdump_install_conf
|
kdump_install_conf
|
||||||
|
>"$initdir/lib/dracut/no-emergency-shell"
|
||||||
|
|
||||||
if is_ssh_dump_target; then
|
if is_ssh_dump_target; then
|
||||||
dracut_install /var/lib/random-seed || exit $?
|
dracut_install /var/lib/random-seed || exit $?
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user