if (!FL_NOIPV4(flags)) {
if (iface->ipv4method == IPV4_IBFT_METHOD) {
- /* When initrd and NM support iBFT, we should just write
- * BOOTPROTO=ibft and let NM deal with it. Until than,
- * just use static and do it ourselves. */
- fprintf(fp, "BOOTPROTO=static
");
- if(ibft_iface_ip()) fprintf(fp, "IPADDR=%s
", ibft_iface_ip());
- if(ibft_iface_mask()) fprintf(fp, "NETMASK=%s
", ibft_iface_mask());
- if(ibft_iface_gw()) fprintf(fp, "GATEWAY=%s
", ibft_iface_gw());
- } else if (iface->ipv4method == IPV4_IBFT_DHCP_METHOD) {
- fprintf(fp, "BOOTPROTO=dhcp
");
+ fprintf(fp, "BOOTPROTO=ibft
");
} else if (iface->ipv4method == IPV4_DHCP_METHOD) {
fprintf(fp, "BOOTPROTO=dhcp
");
} else if (iface->ipv4method == IPV4_MANUAL_METHOD) {
diff --git a/network.py b/network.py
index 8774b14..4c2e07b 100644
--- a/network.py
+++ b/network.py
@@ -831,7 +831,9 @@ class Network:
dev = self.netdevices[nic]
- if networkStorageDevice.host_address:
+ if dev.get('BOOTPROTO') == 'ibft':
+ netargs += "ip=ibft"
+ elif networkStorageDevice.host_address:
if self.hostname:
hostname = self.hostname
else:
diff --git a/scripts/mk-images b/scripts/mk-images
index 9e0e025..b1d9d3e 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -807,6 +807,8 @@ makeinitrd() {
( cd $IMGPATH/usr/share/dbus-1/system-services
cp -a org.freedesktop.nm_dispatcher.service $MBD_DIR/usr/share/dbus-1/system-services
)
+ # for BOOTPROTO=ibft option
+ instbin $IMGPATH /usr/sbin/iscsiadm $MBD_DIR /usr/sbin/iscsiadm
if (!FL_NOIPV4(flags)) {
if (iface->ipv4method == IPV4_IBFT_METHOD) {
- /* When initrd and NM support iBFT, we should just write
- * BOOTPROTO=ibft and let NM deal with it. Until than,
- * just use static and do it ourselves. */
- fprintf(fp, "BOOTPROTO=static
");
- if(ibft_iface_ip()) fprintf(fp, "IPADDR=%s
", ibft_iface_ip());
- if(ibft_iface_mask()) fprintf(fp, "NETMASK=%s
", ibft_iface_mask());
- if(ibft_iface_gw()) fprintf(fp, "GATEWAY=%s
", ibft_iface_gw());
- } else if (iface->ipv4method == IPV4_IBFT_DHCP_METHOD) {
- fprintf(fp, "BOOTPROTO=dhcp
");
+ fprintf(fp, "BOOTPROTO=ibft
");
} else if (iface->ipv4method == IPV4_DHCP_METHOD) {
fprintf(fp, "BOOTPROTO=dhcp
");
} else if (iface->ipv4method == IPV4_MANUAL_METHOD) {
diff --git a/network.py b/network.py
index 8774b14..4c2e07b 100644
--- a/network.py
+++ b/network.py
@@ -831,7 +831,9 @@ class Network:
dev = self.netdevices[nic]
- if networkStorageDevice.host_address:
+ if dev.get('BOOTPROTO') == 'ibft':
+ netargs += "ip=ibft"
+ elif networkStorageDevice.host_address:
if self.hostname:
hostname = self.hostname
else:
diff --git a/scripts/mk-images b/scripts/mk-images
index 9e0e025..b1d9d3e 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -807,6 +807,8 @@ makeinitrd() {
( cd $IMGPATH/usr/share/dbus-1/system-services
cp -a org.freedesktop.nm_dispatcher.service $MBD_DIR/usr/share/dbus-1/system-services
)
+ # for BOOTPROTO=ibft option
+ instbin $IMGPATH /usr/sbin/iscsiadm $MBD_DIR /usr/sbin/iscsiadm