9fd4bf22aa
- dracut.sh: check for logfile (--logfile option) and create it if necessary Add 0139-dracut.sh-check-for-logfile-logfile-option-and-creat.patch - Avoid duplicate names in host_devs Add 0140-dracut.sh-Avoid-duplicate-devices-in-host_devs.patch - iscsi: Avoid bad ip route call on empty address Add 0141-iscsi-Avoid-bad-ip-route-call-on-empty-address.patch - 40network: Don't report error for .../ifroute-* during module setup Add 0142-40network-Don-t-report-error-for-etc-sysconfig-netwo.patch - iscsi: Fix up ipv6 in brackets , iterate over all needed iscsi mounts Add 0143-iscsi-Fix-up-ipv6-in-brackets-iterate-over-all-possi.patch - 90crypt: Fixed crypttab_contains() to also work with device in /etc/crypttab Add 0144-90crypt-Fixed-crypttab_contains-to-also-work-with-de.patch - 40network: handle 'ip=ifname:static' correctly (bnc#892801) Add 0145-40network-handle-ip-ifname-static-correctly.patch OBS-URL: https://build.opensuse.org/request/show/245581 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=180
72 lines
2.2 KiB
Diff
72 lines
2.2 KiB
Diff
From 59ca38d9c6f8e01600c167827df8dc5dd3e140d8 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Renninger <trenn@suse.de>
|
|
Date: Tue, 19 Aug 2014 15:59:21 +0200
|
|
Subject: iscsi: Fix up ipv6 in brackets, iterate over all possible needed
|
|
iscsi mounts
|
|
|
|
for_each_host_dev_and_slaves only iterates over the rootfs, this one is
|
|
successful and then it exits.
|
|
|
|
This does not work if the --mount option is passed on a iscsi target.
|
|
Now really iterate over all host_devs via:
|
|
for_each_host_dev_and_slaves_all
|
|
|
|
and set needed iscsi kernel commandline accordingly.
|
|
Now also the parent block device, e.g. /dev/sda and /dev/sda4 are iterated
|
|
which results in duplicated iscsi parameters.
|
|
Avoid this by piping the final iscsi cmdline function through | sort |uniq
|
|
|
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
---
|
|
modules.d/95iscsi/module-setup.sh | 20 ++++++++++++++------
|
|
1 file changed, 14 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
index 94eb023..9772210 100755
|
|
--- a/modules.d/95iscsi/module-setup.sh
|
|
+++ b/modules.d/95iscsi/module-setup.sh
|
|
@@ -93,6 +93,12 @@ install_iscsiroot() {
|
|
if [ -n "$iscsi_lun" -a "$iscsi_lun" -eq 0 ] ; then
|
|
iscsi_lun=
|
|
fi
|
|
+ # In IPv6 case rd.iscsi.initatior= must pass address in [] brackets
|
|
+ case "$iscsi_address" in
|
|
+ *:*)
|
|
+ iscsi_address="[$iscsi_address]"
|
|
+ ;;
|
|
+ esac
|
|
echo "rd.iscsi.initiator=${iscsi_initiator} netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}"
|
|
fi
|
|
return 0
|
|
@@ -111,7 +117,7 @@ install_softiscsi() {
|
|
install_iscsiroot $iscsi_dev
|
|
}
|
|
|
|
- for_each_host_dev_and_slaves is_softiscsi || return 255
|
|
+ for_each_host_dev_and_slaves_all is_softiscsi || return 255
|
|
return 0
|
|
}
|
|
|
|
@@ -194,11 +200,13 @@ installkernel() {
|
|
# called by dracut
|
|
cmdline() {
|
|
local _iscsiconf=$(install_ibft)
|
|
- if [ "$_iscsiconf" ] ; then
|
|
- echo ${_iscsiconf}
|
|
- else
|
|
- install_softiscsi
|
|
- fi
|
|
+ {
|
|
+ if [ "$_iscsiconf" ] ; then
|
|
+ echo ${_iscsiconf}
|
|
+ else
|
|
+ install_softiscsi
|
|
+ fi
|
|
+ } | sort | uniq
|
|
}
|
|
|
|
# called by dracut
|
|
--
|
|
1.8.4.5
|
|
|