From 315848036bee4397873642c54fa794afe341e3b1 Mon Sep 17 00:00:00 2001 From: Baoquan He Date: Tue, 25 Jun 2013 16:40:43 +0800 Subject: [PATCH] rawdump: only show dd progress bar when core_collector is not makedumpfile When using makedumpfile as core_collector, makedumpfile will show its own progress bar, it will mix with the monitor_dd_progress and cause confusion. In this patch just call monitor_dd_progress when core_collector is not makedumpfile Signed-off-by: Dave Young Acked-by: WANG Chao --- dracut-kdump.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index e7dadcb..c648bb2 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -102,15 +102,12 @@ dump_raw() echo "kdump: saving to raw disk $_raw" - if $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then - _src_size_mb="Unknown" - else + if ! $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then _src_size=`ls -l /proc/vmcore | cut -d' ' -f5` _src_size_mb=$(($_src_size / 1048576)) + monitor_dd_progress $_src_size_mb & fi - monitor_dd_progress $_src_size_mb & - echo "kdump: saving vmcore" $CORE_COLLECTOR /proc/vmcore | dd of=$_raw bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1