Blame 0064-network-parse-ip-opts.sh-assume-rd.neednet-for-multi.patch

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