Blame SOURCES/0371-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch

a0a3b4
From 0d7b00a230a48cad8708893ee1bcc866425d573a Mon Sep 17 00:00:00 2001
a0a3b4
From: Harald Hoyer <harald@redhat.com>
a0a3b4
Date: Tue, 26 Jan 2016 12:26:03 +0100
a0a3b4
Subject: [PATCH] network: if rd.neednet=0 we don't need a bootdev
a0a3b4
a0a3b4
otherwise dracut would wait for the bootdev interface to appear and be
a0a3b4
setup
a0a3b4
a0a3b4
(cherry picked from commit f4f8fb5c10cc8d0047123324197aff25f0a63e04)
a0a3b4
---
a0a3b4
 modules.d/40network/parse-ip-opts.sh | 9 ++++-----
a0a3b4
 1 file changed, 4 insertions(+), 5 deletions(-)
a0a3b4
a0a3b4
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
1755ca
index 7c403f79..3c962044 100755
a0a3b4
--- a/modules.d/40network/parse-ip-opts.sh
a0a3b4
+++ b/modules.d/40network/parse-ip-opts.sh
a0a3b4
@@ -42,6 +42,8 @@ if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
a0a3b4
     #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
a0a3b4
     echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf
a0a3b4
     info "Multiple ip= arguments: assuming rd.neednet=1"
a0a3b4
+else
a0a3b4
+    unset NEEDBOOTDEV
a0a3b4
 fi
a0a3b4
 
a0a3b4
 # Check ip= lines
a0a3b4
@@ -50,17 +52,14 @@ for p in $(getargs ip=); do
a0a3b4
     ip_to_var $p
a0a3b4
 
a0a3b4
     # make first device specified the BOOTDEV
a0a3b4
-    if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
a0a3b4
+    if [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
a0a3b4
         BOOTDEV="$dev"
a0a3b4
-        [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'"
a0a3b4
+        info "Setting bootdev to '$BOOTDEV'"
a0a3b4
     fi
a0a3b4
 
a0a3b4
     # skip ibft since we did it above
a0a3b4
     [ "$autoconf" = "ibft" ] && continue
a0a3b4
 
a0a3b4
-    # We need to have an ip= line for the specified bootdev
a0a3b4
-    [ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1
a0a3b4
-
a0a3b4
     # Empty autoconf defaults to 'dhcp'
a0a3b4
     if [ -z "$autoconf" ] ; then
a0a3b4
         warn "Empty autoconf values default to dhcp"