|
|
|
@ -13,7 +13,7 @@ check() {
@@ -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() {
@@ -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() {
@@ -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" |
|
|
|
|