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 <bhe@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Baoquan He 2013-03-01 15:14:20 +08:00
parent 603224b256
commit 8281e9a37a
1 changed files with 3 additions and 0 deletions

View File

@ -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