[[ $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
[[ $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
}
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"