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

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