dracut/0033-iscsi-module-setup.sh-fix-host-only-mount-checks.patch
Harald Hoyer 0c26bf1316 dracut-018-40.git20120504
- new upstream version
2012-05-04 13:03:29 +02:00

44 lines
1.4 KiB
Diff

From cb08b0132f6e6631b04576959549c0a0d8218afd Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 25 Apr 2012 11:23:10 +0200
Subject: [PATCH] iscsi/module-setup.sh: fix host-only/mount checks
---
modules.d/95iscsi/module-setup.sh | 16 ++++++----------
1 Datei geändert, 6 Zeilen hinzugefügt(+), 10 Zeilen entfernt(-)
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 2f343ee..bfd9d73 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -15,8 +15,11 @@ check() {
[[ $debug ]] && set -x
is_iscsi() (
- [[ -L /sys/dev/block/$1 ]] || return
- cd "$(readlink -f /sys/dev/block/$1)"
+ local _dev
+ _dev=$(get_maj_min $1)
+
+ [[ -L /sys/dev/block/$_dev ]] || return
+ cd "$(readlink -f /sys/dev/block/$_dev)"
until [[ -d sys || -d iscsi_session ]]; do
cd ..
done
@@ -24,14 +27,7 @@ check() {
)
[[ $hostonly ]] || [[ $mount_needs ]] && {
- _rootdev=$(find_root_block_device)
- if [[ $_rootdev ]]; then
- # root lives on a block device, so we can be more precise about
- # hostonly checking
- check_block_and_slaves is_iscsi "$_rootdev" || return 1
- else
- return 1
- fi
+ for_each_host_dev_fs is_iscsi || return 1
}
return 0
}