]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network: move ibft parsing before all other network cmdline parser
authorHarald Hoyer <harald@redhat.com>
Mon, 26 Aug 2013 08:18:47 +0000 (10:18 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 26 Aug 2013 08:18:47 +0000 (10:18 +0200)
otherwise the config produced by ibft will not get processed

modules.d/40network/module-setup.sh
modules.d/40network/parse-ibft.sh [new file with mode: 0755]
modules.d/40network/parse-ip-opts.sh

index 464e0cb95c0fb7d657558e28021dce9fd7041f72..d2833d0f205be2cd5dba9bcf7b7a0c322ba6e902 100755 (executable)
@@ -82,6 +82,7 @@ install() {
     inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
     inst_hook pre-udev 60 "$moddir/net-genrules.sh"
     inst_hook cmdline 91 "$moddir/dhcp-root.sh"
+    inst_hook cmdline 92 "$moddir/parse-ibft.sh"
     inst_hook cmdline 95 "$moddir/parse-vlan.sh"
     inst_hook cmdline 96 "$moddir/parse-bond.sh"
     inst_hook cmdline 96 "$moddir/parse-team.sh"
diff --git a/modules.d/40network/parse-ibft.sh b/modules.d/40network/parse-ibft.sh
new file mode 100755 (executable)
index 0000000..9776c75
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+command -v getarg >/dev/null          || . /lib/dracut-lib.sh
+command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
+
+# If ibft is requested, read ibft vals and write ip=XXX cmdline args
+[ "ibft" = "$(getarg ip=)" ] && ibft_to_cmdline
+
index 4ca509804b71b106f5e29b653b7d9d90cf83d7af..4bf286d8493f774c4769f66bfee129e65ae5babe 100755 (executable)
@@ -15,7 +15,6 @@
 #
 
 command -v getarg >/dev/null          || . /lib/dracut-lib.sh
-command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
 
 if [ -n "$netroot" ] && [ -z "$(getarg ip=)" ] && [ -z "$(getarg BOOTIF=)" ]; then
     # No ip= argument(s) for netroot provided, defaulting to DHCP
@@ -39,9 +38,6 @@ if [ -n "$NEEDBOOTDEV" ] ; then
     [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
 fi
 
-# If ibft is requested, read ibft vals and write ip=XXX cmdline args
-[ "ibft" = "$(getarg ip=)" ] && ibft_to_cmdline
-
 # Check ip= lines
 # XXX Would be nice if we could errorcheck ip addresses here as well
 for p in $(getargs ip=); do