#!/bin/sh

PREREQ="udev"

prereqs()
{
	echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
	prereqs
	exit 0
	;;
esac

if [ ! -e /etc/iscsi/iscsi.initramfs ]; then
	exit 0
fi

# Hooks for loading iscsi bits into the initramfs
. /usr/share/initramfs-tools/hook-functions

copy_exec /usr/sbin/iscsistart /sbin
cp /etc/iscsi/initiatorname.iscsi $DESTDIR/etc
cp /etc/iscsi/iscsi.initramfs $DESTDIR/etc

for x in crc32c libcrc32c iscsi_tcp libiscsi scsi_transport_iscsi iscsi_ibft; do
	manual_add_modules ${x}
done
