From 8770ac2d6f3f910e9f759a4a359adbd6942ebead Mon Sep 17 00:00:00 2001 From: Dave Young Date: Wed, 19 Dec 2012 17:27:40 +0800 Subject: [PATCH] revert explictly handling of PIPESTATUS To simplify the code logic, remove the previous PIPESTATUS handling because previous patch "enable pipefail bash option" added pipefail option which will also resolve this issue. This is a reverting of below commit: commit 3111ff74c9f877968dd92fafd08b84664a587e1c Author: Chao Wang Date: Mon Aug 6 14:49:52 2012 +0800 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_f in case pipe fails it will still return 0, Fix this by return the PIPESTATUS Signed-off-by: Chao Wang Acked-by: Dave Young Signed-off-by: Dave Young Acked-by: Baoquan He --- dracut-kdump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 3ced67a..fc6e750 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -88,7 +88,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 ${PIPESTATUS[0]} + return 0 } dump_rootfs()