From 7c7cbef612e53f5c0ec31b3924c19591f42d8df6 Mon Sep 17 00:00:00 2001 From: WANG Chao Date: Fri, 21 Jun 2013 11:23:57 +0800 Subject: [PATCH] dracut-kdump.sh: name the invalid vmcore to vmcore-incomplete When makedumpfile failed, it could still generate a invalid vmcore. It's better to suffix these invalid vmcore files with "-incomplete", as we do in RHEL6. Signed-off-by: WANG Chao Acked-by: Vivek Goyal --- dracut-kdump.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index ff453bb..ba28387 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -70,7 +70,8 @@ dump_fs() save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/" echo "kdump: saving vmcore" - $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore || return 1 + $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1 + mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore echo "kdump: saving vmcore complete" umount $_mp || return 1 @@ -113,7 +114,8 @@ dump_to_rootfs() save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$NEWROOT/$KDUMP_PATH/$HOST_IP-$DATEDIR/" echo "kdump: saving vmcore" - $CORE_COLLECTOR /proc/vmcore $NEWROOT/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore || return 1 + $CORE_COLLECTOR /proc/vmcore $NEWROOT/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1 + mv $NEWROOT/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $NEWROOT/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore echo "kdump: saving vmcore complete" sync