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

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