|
|
712866 |
From 197e4c90b95f2d9e57104d3b462918c335494697 Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Tue, 25 Aug 2015 11:15:59 +0200
|
|
|
712866 |
Subject: [PATCH] iscsi/parse-iscsiroot.sh: do not modify netroot
|
|
|
712866 |
|
|
|
712866 |
---
|
|
|
712866 |
modules.d/95iscsi/parse-iscsiroot.sh | 17 +++++++++++++----
|
|
|
712866 |
1 file changed, 13 insertions(+), 4 deletions(-)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
|
5c6c2a |
index 91cd4630..e9444a5f 100755
|
|
|
712866 |
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
|
|
712866 |
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
|
712866 |
@@ -16,10 +16,17 @@
|
|
|
712866 |
# This script is sourced, so root should be set. But let's be paranoid
|
|
|
712866 |
[ -z "$root" ] && root=$(getarg root=)
|
|
|
712866 |
if [ -z "$netroot" ]; then
|
|
|
712866 |
- for netroot in $(getargs netroot=); do
|
|
|
712866 |
- [ "${netroot%%:*}" = "iscsi" ] && break
|
|
|
712866 |
+ for nroot in $(getargs netroot=); do
|
|
|
712866 |
+ [ "${nroot%%:*}" = "iscsi" ] && break
|
|
|
712866 |
done
|
|
|
712866 |
- [ "${netroot%%:*}" = "iscsi" ] || unset netroot
|
|
|
712866 |
+ if [ "${nroot%%:*}" = "iscsi" ]; then
|
|
|
712866 |
+ netroot="$nroot"
|
|
|
712866 |
+ else
|
|
|
712866 |
+ for nroot in $(getargs netroot=); do
|
|
|
712866 |
+ [ "${nroot%%:*}" = "dhcp" ] && break
|
|
|
712866 |
+ done
|
|
|
712866 |
+ netroot="$nroot"
|
|
|
712866 |
+ fi
|
|
|
712866 |
fi
|
|
|
712866 |
[ -z "$iscsiroot" ] && iscsiroot=$(getarg iscsiroot=)
|
|
|
712866 |
[ -z "$iscsi_firmware" ] && getargbool 0 rd.iscsi.firmware -y iscsi_firmware && iscsi_firmware="1"
|
|
|
712866 |
@@ -65,7 +72,9 @@ fi
|
|
|
712866 |
|
|
|
712866 |
# iscsi_firmware does not need argument checking
|
|
|
712866 |
if [ -n "$iscsi_firmware" ] || getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
|
|
712866 |
- [ -z "$netroot" ] && netroot=iscsi:
|
|
|
712866 |
+ if [ "$root" != "dhcp" ] && [ "$netroot" != "dhcp" ]; then
|
|
|
712866 |
+ [ -z "$netroot" ] && netroot=iscsi:
|
|
|
712866 |
+ fi
|
|
|
712866 |
modprobe -b -q iscsi_boot_sysfs 2>/dev/null
|
|
|
712866 |
modprobe -b -q iscsi_ibft
|
|
|
712866 |
# if no ip= is given, but firmware
|