]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
iscsi: always popd, even if there is no iscsi device
authorRenaud Métrich <rmetrich@redhat.com>
Fri, 1 Mar 2019 10:46:43 +0000 (11:46 +0100)
committerLukáš Nykrýn <lnykryn@redhat.com>
Mon, 4 Mar 2019 09:43:21 +0000 (10:43 +0100)
modules.d/95iscsi/module-setup.sh

index 4b6c4a3c8ef5ab9f1dfe3a1bd3077205c12d173d..8b224be31c1ffce30606d017ab88451beb160cf1 100755 (executable)
@@ -22,8 +22,10 @@ check() {
 
     [[ $hostonly ]] || [[ $mount_needs ]] && {
         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
+        [[ $_is_iscsi == 0 ]] || return 255
     }
     return 0
 }