From 8281e9a37a52d503d899b1cdb018068464fc1ba0 Mon Sep 17 00:00:00 2001 From: Baoquan He Date: Fri, 1 Mar 2013 15:14:20 +0800 Subject: [PATCH] Remove "-F" in CORE_COLLECTOR when dump_to_rootfs If CORE_COLLECTOR is makedumpfile, "-F" is only allowed on ssh/raw, removing it when dump_to_rootfs is necessary. Signed-off-by: Baoquan He Acked-by: Dave Young Acked-by: Vivek Goyal --- dracut-kdump.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 38d0769..7b086c7 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -85,6 +85,9 @@ dump_raw() dump_to_rootfs() { + #For dumping to rootfs, "-F" need be removed. Surely only available for makedumpfile case. + [[ $CORE_COLLECTOR = *makedumpfile* ]] && CORE_COLLECTOR=`echo $CORE_COLLECTOR | sed -e s/-F//g` + mount -o remount,rw $NEWROOT/ || return 1 mkdir -p $NEWROOT/$KDUMP_PATH/$HOST_IP-$DATEDIR $CORE_COLLECTOR /proc/vmcore $NEWROOT/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore || return 1