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