--- iscsi.ORIG 2013-10-11 20:19:59.000000000 +0400 +++ iscsi 2013-10-16 14:36:06.832546855 +0400 @@ -26,6 +26,14 @@ wait_for_udev + + loaded=$(sed -n "/^be2iscsi/p" /proc/modules) + if [ -n "$loaded" ] ; then + /sbin/iscsiadm -m fw -l + return + fi + + configure_networking # write info file for later consumption by iscsi-network-interface.conf if [ -n "${DEVICE}" ] && [ -e "/run/net-${DEVICE}.conf" ]; then @@ -37,7 +45,7 @@ if [ -z $ISCSI_AUTO ]; then if [ -z $ISCSI_INITIATOR ]; then - . /etc/initiatorname.iscsi + . /etc/iscsi/initiatorname.iscsi ISCSI_INITIATOR=$InitiatorName fi @@ -82,7 +90,7 @@ parse_iscsi_ops () { - . /etc/iscsi.initramfs + . /etc/iscsi/iscsi.initramfs for x in $(cat /proc/cmdline); do case ${x} in @@ -134,4 +142,14 @@ udevadm settle + +# Because we will run and use the iSCSI daemon from the new root +# the old one has to be killed. During that time no iSCSI +# exceptions should occur! + +# kill iscsid, will be restarted from the real root +/sbin/iscsiadm -k 0 +rm -f /run/iscsid.pid + + exit 0