]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/parse-ip-opts.sh: assume rd.neednet for multiple ip options
authorHarald Hoyer <harald@redhat.com>
Wed, 12 Aug 2015 12:25:23 +0000 (14:25 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 12 Aug 2015 12:25:23 +0000 (14:25 +0200)
set rd.neednet on the kernel cmdline to disable this behaviour

modules.d/40network/parse-ip-opts.sh

index a481b46a0a270ce250e12c111f6d74107265e03e..33bb0681d5ce1c2d5f5a83c8a85dd830b7eec860 100755 (executable)
@@ -36,8 +36,10 @@ unset count
 # If needed, check if bootdev= contains anything usable
 BOOTDEV=$(getarg bootdev=)
 
-if [ -n "$NEEDBOOTDEV" ] ; then
-    [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
+if [ -n "$NEEDBOOTDEV" ] && getargbool 1 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"
 fi
 
 # Check ip= lines
@@ -48,7 +50,7 @@ for p in $(getargs ip=); do
     # make first device specified the BOOTDEV
     if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
         BOOTDEV="$dev"
-        [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
+        [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'"
     fi
 
     # skip ibft since we did it above