[kexec-tools/f18] enable pipefail bash option
Dave Young
yangrr at fedoraproject.org
Fri Dec 21 03:38:36 UTC 2012
commit e36d4ab60d2a37853db51911ae29559403514f11
Author: Dave Young <dyoung at redhat.com>
Date: Wed Dec 19 15:45:05 2012 +0800
enable pipefail bash option
Follwing code will not return 1 if CORE_COLLECTOR /proc/vmcore fail:
$CORE_COLLECTOR /proc/vmcore | ssh $_opt $2 "dd bs=512 of=$_dir/vmcore-incomplete" || return 1
Fix it by enabling pipefail option
Tested in F18 with ssh dump.
Signed-off-by: Dave Young <dyoung at redhat.com>
Acked-by: Baoquan He <bhe at redhat.com>
dracut-kdump.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index 2a7e956..3ced67a 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -2,6 +2,7 @@
. /lib/dracut-lib.sh
+set -o pipefail
set -x
KDUMP_PATH="/var/crash"
CORE_COLLECTOR=""
More information about the scm-commits
mailing list