dracut-module-setup.sh: make iscsi check fail early if cd failed
upstream: fedora
resolves: bz2003832
conflict: none
commit 67e559a6b9
Author: Kairui Song <kasong@redhat.com>
Date: Wed Aug 4 16:29:55 2021 +0800
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 <kasong@redhat.com>
Acked-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
parent
72c3befcb8
commit
9abf44a082
@ -852,7 +852,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
|
||||
|
Loading…
Reference in New Issue
Block a user