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