From d5bc608abd93f2bf584ead30d0fc8bba20a639b3 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Tue, 12 Jun 2012 09:42:29 +0800 Subject: [PATCH] dump_rootfs for default target fix Do not reboot in dump_rootfs function, also do not directly call dump_rootfs for default dump. Instead just adding it to DUMP_INSTRUCTION as other user specified dump target. Signed-off-by: Dave Young Acked-by: Vivek Goyal --- dracut-kdump.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index c66ce0d..03a3c48 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -100,8 +100,6 @@ dump_rootfs() mkdir -p $NEWROOT/$KDUMP_PATH/$DATEDIR $CORE_COLLECTOR /proc/vmcore $NEWROOT/$KDUMP_PATH/$DATEDIR/vmcore || return 1 sync - reboot -f - return 0 } dump_nfs() @@ -185,11 +183,8 @@ read_kdump_conf() read_kdump_conf -if [ -n "$DUMP_INSTRUCTION" ] -then - eval "$DUMP_INSTRUCTION && reboot -f" -else - dump_rootfs +if [ -z "$DUMP_INSTRUCTION" ]; then + add_dump_code "dump_rootfs" fi - +eval "$DUMP_INSTRUCTION && reboot -f"