From 62d6f35de4cc0058c1ca717443896ed95bd1a35d Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Nov 09 2021 13:46:10 +0000 Subject: dracut-kdump.sh: POSIX doesn't support pipefail upstream: fedora resolves: bz2003832 conflict: none commit 725027b735e6f27e51572c570b34c0c7186203ef Author: Kairui Song Date: Thu Aug 12 02:55:32 2021 +0800 dracut-kdump.sh: POSIX doesn't support pipefail Set pipefail will cause POSIX shell to exit with failure. So only do that in bash. Signed-off-by: Kairui Song Acked-by: Philipp Rudo Signed-off-by: Tao Liu --- diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 25972e4..3c1b080 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -31,7 +31,10 @@ KDUMP_POST="" NEWROOT="/sysroot" OPALCORE="/sys/firmware/opal/mpipl/core" -set -o pipefail +# POSIX doesn't have pipefail, only apply when using bash +# shellcheck disable=SC3040 +[ -n "$BASH" ] && set -o pipefail + DUMP_RETVAL=0 get_kdump_confs()