Blob Blame History Raw
From 53ecce179b2a5b01ba9d62527200712bba2b2032 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 12 Aug 2015 14:25:23 +0200
Subject: [PATCH] network/parse-ip-opts.sh: assume rd.neednet for multiple ip
 options

set rd.neednet on the kernel cmdline to disable this behaviour

(cherry picked from commit 4e9ba952bfa607ac47bfe3cf4943ae3386da22bc)
---
 modules.d/40network/parse-ip-opts.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
index 5b96e06..faee8f9 100755
--- a/modules.d/40network/parse-ip-opts.sh
+++ b/modules.d/40network/parse-ip-opts.sh
@@ -38,8 +38,10 @@ unset count
 # If needed, check if bootdev= contains anything usable
 BOOTDEV=$(getarg bootdev=)
 
-if [ -n "$NEEDBOOTDEV" ] ; then
-    [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
+if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
+    #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
+    echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf
+    info "Multiple ip= arguments: assuming rd.neednet=1"
 fi
 
 # Check ip= lines
@@ -50,7 +52,7 @@ for p in $(getargs ip=); do
     # make first device specified the BOOTDEV
     if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
         BOOTDEV="$dev"
-        [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
+        [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'"
     fi
 
     # skip ibft since we did it above