File 0181-iscsi_set_boot_protocol_from_ifcfg.patch of Package dracut.892

diff -Naur b/modules.d/95iscsi/module-setup.sh c/modules.d/95iscsi/module-setup.sh
--- b/modules.d/95iscsi/module-setup.sh	2015-07-14 09:33:13.847904527 +0200
+++ c/modules.d/95iscsi/module-setup.sh	2015-08-06 07:22:05.344812059 +0200
@@ -79,7 +79,14 @@
     [ -z "$iscsi_address" ] && return
     local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p')
     ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
-    printf 'ip=%s:static ' ${ifname}
+
+    #follow ifcfg settings for boot protocol
+    bootproto=$(sed -n "/BOOTPROTO/s/BOOTPROTO='\([[:alpha:]]*6\?\)4\?'/\1/p" /etc/sysconfig/network/ifcfg-$ifname)
+    if [ $bootproto ]; then
+        printf 'ip=%s:%s ' ${ifname} ${bootproto}
+    else
+        printf 'ip=%s:static ' ${ifname}
+    fi
 
     if [ -e /sys/class/net/$ifname/address ] ; then
         ifmac=$(cat /sys/class/net/$ifname/address)