From 7c1880296619f590a333ace93183e46eefd7ac8c Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 4 May 2011 10:17:46 +0200 Subject: [PATCH] iscsi: find iscsi kernel modules by symbol names --- modules.d/95iscsi/module-setup.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh index cddd4f3..793a243 100755 --- a/modules.d/95iscsi/module-setup.sh +++ b/modules.d/95iscsi/module-setup.sh @@ -13,7 +13,7 @@ check() { [[ $debug ]] && set -x - is_iscsi() ( + is_iscsi() ( [[ -L /sys/dev/block/$1 ]] || return cd "$(readlink -f /sys/dev/block/$1)" until [[ -d sys || -d iscsi_session ]]; do @@ -25,7 +25,7 @@ check() { [[ $hostonly ]] && { rootdev=$(find_root_block_device) if [[ $rootdev ]]; then - # root lives on a block device, so we can be more precise about + # 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 @@ -40,12 +40,17 @@ depends() { } installkernel() { - instmods iscsi_tcp crc32c iscsi_ibft be2iscsi bnx2 bnx2x bnx2i + instmods iscsi_tcp iscsi_ibft crc32c + iscsi_module_test() { + local iscsifuncs='iscsi_register_transport' + fgrep -q "$iscsifuncs" "$1" + } + instmods $(filter_kernel_modules iscsi_module_test) } install() { dracut_install umount - inst iscsistart + inst iscsistart inst hostname inst iscsi-iname inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" -- 2.7.4