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>
This commit is contained in:
parent
3b2fa982bb
commit
67e559a6b9
@ -855,7 +855,7 @@ kdump_check_iscsi_targets () {
|
|||||||
_dev=$1
|
_dev=$1
|
||||||
|
|
||||||
[[ -L /sys/dev/block/$_dev ]] || return
|
[[ -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
|
until [[ -d sys || -d iscsi_session ]]; do
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user