From 3111ff74c9f877968dd92fafd08b84664a587e1c Mon Sep 17 00:00:00 2001 From: Chao Wang Date: Mon, 6 Aug 2012 14:49:52 +0800 Subject: [PATCH] Change return value to indicate the result of dump_raw() correctly. Resolves bz845916. For raw dump code below: $CORE_COLLECTOR /proc/vmcore | dd of=$1 bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1 in case pipe fails it will still return 0, Fix this by return the PIPESTATUS[0] at the end of this fuction. Signed-off-by: Chao Wang Acked-by: Dave Young --- dracut-kdump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 397c468..75c4a4e 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -115,7 +115,7 @@ dump_raw() monitor_dd_progress $_src_size_mb & $CORE_COLLECTOR /proc/vmcore | dd of=$1 bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1 - return 0 + return ${PIPESTATUS[0]} } dump_rootfs()