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

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