From 67e559a6b905b8f06a0929b7d7c86130fbe30638 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Wed, 4 Aug 2021 16:29:55 +0800 Subject: [PATCH] dracut-module-setup.sh: make iscsi check fail early if cd failed As suggested by: https://github.com/koalaman/shellcheck/wiki/SC2164 Signed-off-by: Kairui Song Acked-by: Philipp Rudo --- dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index f13b1a7..267c98e 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -855,7 +855,7 @@ kdump_check_iscsi_targets () { _dev=$1 [[ -L /sys/dev/block/$_dev ]] || return - cd "$(readlink -f /sys/dev/block/$_dev)" + cd "$(readlink -f "/sys/dev/block/$_dev")" || return 1 until [[ -d sys || -d iscsi_session ]]; do cd .. done