Blob Blame History Raw
From c87d489ca619c719323da446076ab67dc091960d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 6 Sep 2016 15:18:24 +0200
Subject: [PATCH] network/parse-ip-opts: be more liberal to multiple ip=
 options

Do not bail out early.

https://bugzilla.redhat.com/show_bug.cgi?id=1304069
---
 modules.d/40network/parse-ip-opts.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
index 3c962044..68afe91b 100755
--- a/modules.d/40network/parse-ip-opts.sh
+++ b/modules.d/40network/parse-ip-opts.sh
@@ -38,7 +38,7 @@ unset count
 # If needed, check if bootdev= contains anything usable
 BOOTDEV=$(getarg bootdev=)
 
-if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
+if [ -n "$NEEDBOOTDEV" ] && ! getargbool 0 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"
@@ -79,8 +79,8 @@ for p in $(getargs ip=); do
                 ;;
             auto6);;
             dhcp|dhcp6|on|any) \
-                [ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \
-                    die "Sorry, 'ip=$p' does not make sense for multiple interface configurations"
+                #[ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \
+                #    die "Sorry, 'ip=$p' does not make sense for multiple interface configurations"
                 [ -n "$ip" ] && \
                     die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoopt'"
                 ;;