dracut/0199-rd-iscsi-waitnet-default-false.patch

56 lines
1.7 KiB
Diff
Raw Normal View History

Accepting request 431190 from home:hreinecke:branches:Base:System - 90multipath: parse commandline option 'multipath=off' (bsc#1001691) *add 0307-90multipath-parse-kernel-commandline-option-multipat.patch - 95fcoe: do not start fcoemon twice (bsc#1001512) *add 0225-95fcoe-do-not-start-fcoemon-twice.patch - Reformat patch headers: *modify 0199-rd-iscsi-waitnet-default-false.patch *modify 0200-dracut_fix_multipath_without_config.patch *modify 0210-add_fcoe_uefi_check.patch *modify 0212-fcoe_reorder_init_path.patch - Rediff patches to apply cleanly: *modify 0124-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch *modify 0133-Allow-multiple-configurations-per-network-interface-.patch *modify 0170-iscsi-skip-ibft-invalid-dhcp.patch *modify 0218-40network-allow-persistent-interface-names.patch - Remove spurious whitespaces: *modify 0169-network_set_mtu_macaddr_for_dhcp.patch - 40network: print out correct prefix (bsc#996141) *modify 0125-40network-separate-mask-and-prefix.patch - 95iscsi: setup bnx2i offload connection correctly (bsc#997598) *add 0224-95iscsi-setup-bnx2i-offload-connections-properly.patch - Rename patches to match sequence number: *old: 0019-40network-Fix-race-condition-when-wait-for-networks.patch *new: 0012-40network-Fix-race-condition-when-wait-for-networks.patch *old: 0066-40network-always-start-netroot-in-ifup.sh.patch *new: 0013-40network-always-start-netroot-in-ifup.sh.patch - rd.iscsi.waitnet should default to false in order for dracut to wait for the network devices (bsc#997598) OBS-URL: https://build.opensuse.org/request/show/431190 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=267
2016-10-07 08:44:57 +00:00
From fbd1ae50f37d4d904dc69844de869ff2daf02ded Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Tue, 27 Sep 2016 12:38:21 +0200
Subject: 95iscsi: wait for network devices when starting iscsi
rd.iscsi.waitnet should default to false in order for dracut to
wait for any network devices to come up.
References: bsc#997598
Signed-off-by: Thomas Blume <thomas.blume@suse.com>
---
modules.d/95iscsi/iscsiroot.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
index 77755fb..6f0a15d 100755
--- a/modules.d/95iscsi/iscsiroot.sh
+++ b/modules.d/95iscsi/iscsiroot.sh
@@ -62,13 +62,14 @@ handle_firmware()
warn "iscsiadm: Could not get list of targets from firmware."
else
ifaces=( $(echo /sys/firmware/ibft/ethernet*) )
- [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
retry=$(cat /tmp/session-retry)
if [ $retry -lt ${#ifaces[*]} ]; then
let retry++
echo $retry > /tmp/session-retry
return 1
+ else
+ rm /tmp/session-retry
fi
if ! iscsiadm -m fw -l; then
@@ -250,7 +251,7 @@ handle_netroot()
ret=0
-if [ "$netif" != "timeout" ] && getargbool 1 rd.iscsi.waitnet; then
+if [ "$netif" != "timeout" ] && getargbool 0 rd.iscsi.waitnet; then
all_ifaces_setup || exit 0
fi
@@ -264,6 +265,7 @@ fi
if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
if [ "$netif" = "timeout" ] || [ "$netif" = "online" ]; then
+ [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
handle_firmware
ret=$?
fi
--
2.6.6