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@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
This commit is contained in:
Dave Young 2012-12-19 15:45:05 +08:00
parent 8fddece4e9
commit e36d4ab60d

View File

@ -2,6 +2,7 @@
. /lib/dracut-lib.sh
set -o pipefail
set -x
KDUMP_PATH="/var/crash"
CORE_COLLECTOR=""