Blame SOURCES/0288-network-parse-ip-opts.sh-assume-rd.neednet-for-multi.patch

64b87c
From 53ecce179b2a5b01ba9d62527200712bba2b2032 Mon Sep 17 00:00:00 2001
64b87c
From: Harald Hoyer <harald@redhat.com>
64b87c
Date: Wed, 12 Aug 2015 14:25:23 +0200
64b87c
Subject: [PATCH] network/parse-ip-opts.sh: assume rd.neednet for multiple ip
64b87c
 options
64b87c
64b87c
set rd.neednet on the kernel cmdline to disable this behaviour
64b87c
64b87c
(cherry picked from commit 4e9ba952bfa607ac47bfe3cf4943ae3386da22bc)
64b87c
---
64b87c
 modules.d/40network/parse-ip-opts.sh | 8 +++++---
64b87c
 1 file changed, 5 insertions(+), 3 deletions(-)
64b87c
64b87c
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
1755ca
index 5b96e069..faee8f99 100755
64b87c
--- a/modules.d/40network/parse-ip-opts.sh
64b87c
+++ b/modules.d/40network/parse-ip-opts.sh
64b87c
@@ -38,8 +38,10 @@ unset count
64b87c
 # If needed, check if bootdev= contains anything usable
64b87c
 BOOTDEV=$(getarg bootdev=)
64b87c
 
64b87c
-if [ -n "$NEEDBOOTDEV" ] ; then
64b87c
-    [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
64b87c
+if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
64b87c
+    #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
64b87c
+    echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf
64b87c
+    info "Multiple ip= arguments: assuming rd.neednet=1"
64b87c
 fi
64b87c
 
64b87c
 # Check ip= lines
64b87c
@@ -50,7 +52,7 @@ for p in $(getargs ip=); do
64b87c
     # make first device specified the BOOTDEV
64b87c
     if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
64b87c
         BOOTDEV="$dev"
64b87c
-        [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
64b87c
+        [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'"
64b87c
     fi
64b87c
 
64b87c
     # skip ibft since we did it above