iscsi: always popd, even if there is no iscsi device

master
Renaud Métrich 2019-03-01 11:46:43 +01:00 committed by Lukáš Nykrýn
parent fc141f2286
commit 33cfad0b8f
1 changed files with 3 additions and 1 deletions

View File

@ -22,8 +22,10 @@ check() {


[[ $hostonly ]] || [[ $mount_needs ]] && { [[ $hostonly ]] || [[ $mount_needs ]] && {
pushd . >/dev/null pushd . >/dev/null
for_each_host_dev_and_slaves is_iscsi || return 255 for_each_host_dev_and_slaves is_iscsi
local _is_iscsi=$?
popd >/dev/null popd >/dev/null
[[ $_is_iscsi == 0 ]] || return 255
} }
return 0 return 0
} }