From c373a2c5821ae707710ef20ef0d11e2f304e6a0d Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Wed, 3 Nov 2021 17:03:30 +0800 Subject: [PATCH] Don't use die in dracut-module-setup.sh upstream: fedora resolves: bz2003832 conflict: none commit 8b4b7bf808117ccf3a4be5c9dc16ad1f008659a3 Author: Coiby Xu Date: Fri Mar 26 10:22:09 2021 +0800 Don't use die in dracut-module-setup.sh die (in dracut-lib.sh) is supposed to be used in the initramfs environment. Signed-off-by: Coiby Xu Acked-by: Kairui Song Signed-off-by: Tao Liu --- dracut-module-setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 141a67e..515cff0 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -516,7 +516,10 @@ kdump_setup_znet() { kdump_get_ip_route() { local _route=$(/sbin/ip -o route get to $1 2>&1) - [ $? != 0 ] && die "Bad kdump network destination: $1" + if [[ $? != 0 ]]; then + derror "Bad kdump network destination: $1" + exit 1 + fi echo $_route }