execute kdump_post after do_default_action
User complains that kdump_post script doesn't execute after mount failed. This happened since mount failure will trigger kdump-error-handler.service, and then start kdump-error-handler.sh. However in kdump-error-handler.sh it doesn't execute kdump_post. Hence add it in this patch. Surely the function do_kdump_post need be moved into kdump-lib-initramfs.sh to be a common function. v1->v2: Add a return value to do_kdump_post when invoked in kdump_error-handler.sh. And call do_kdump_post earlier than do_default_action, otherwise it may not execute if reboot/poweroff/halt. Signed-off-by: Baoquan He <bhe@redhat.com> Acked-by: Dave Young <dyoung@redhat.com> Acked-by: Meifei Huang <mhuang@redhat.com>
This commit is contained in:
parent
17b86f7fce
commit
f4c45236bf
@ -6,5 +6,6 @@ set -o pipefail
|
|||||||
export PATH=$PATH:$KDUMP_SCRIPT_DIR
|
export PATH=$PATH:$KDUMP_SCRIPT_DIR
|
||||||
|
|
||||||
get_kdump_confs
|
get_kdump_confs
|
||||||
|
do_kdump_post 1
|
||||||
do_default_action
|
do_default_action
|
||||||
do_final_action
|
do_final_action
|
||||||
|
@ -35,13 +35,6 @@ do_kdump_pre()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_kdump_post()
|
|
||||||
{
|
|
||||||
if [ -n "$KDUMP_POST" ]; then
|
|
||||||
"$KDUMP_POST" "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
add_dump_code()
|
add_dump_code()
|
||||||
{
|
{
|
||||||
DUMP_INSTRUCTION=$1
|
DUMP_INSTRUCTION=$1
|
||||||
|
@ -161,3 +161,10 @@ do_final_action()
|
|||||||
{
|
{
|
||||||
eval $FINAL_ACTION
|
eval $FINAL_ACTION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_kdump_post()
|
||||||
|
{
|
||||||
|
if [ -n "$KDUMP_POST" ]; then
|
||||||
|
"$KDUMP_POST" "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user