diff --git a/src/nm-initrd-generator/nmi-cmdline-reader.c b/src/nm-initrd-generator/nmi-cmdline-reader.c index d7fd8667b..a6cd30f10 100644 --- a/src/nm-initrd-generator/nmi-cmdline-reader.c +++ b/src/nm-initrd-generator/nmi-cmdline-reader.c @@ -1451,9 +1451,10 @@ nmi_cmdline_reader_parse(const char *etc_connections_dir, gs_unref_ptrarray GPtrArray *routes = NULL; gs_unref_ptrarray GPtrArray *znets = NULL; int i; - guint64 dhcp_timeout = 90; - guint64 dhcp_num_tries = 1; - gboolean nvmf_nonbft = FALSE; + guint64 dhcp_timeout = 90; + guint64 dhcp_num_tries = 1; + gboolean nvmf_nonbft = FALSE; + gboolean have_dracut_nbft = FALSE; reader = reader_new(); @@ -1470,7 +1471,10 @@ nmi_cmdline_reader_parse(const char *etc_connections_dir, /* pass */ } else if (nm_streq(tag, "net.ifnames")) net_ifnames = !nm_streq(argument, "0"); - else if (nm_streq(tag, "rd.peerdns")) + else if (nm_streq(tag, "ifname")) { + if (NM_STR_HAS_PREFIX(argument, "nbft")) + have_dracut_nbft = TRUE; + } else if (nm_streq(tag, "rd.peerdns")) reader->ignore_auto_dns = !_nm_utils_ascii_str_to_bool(argument, TRUE); else if (nm_streq(tag, "rd.net.timeout.dhcp")) { if (nm_streq0(argument, "infinity")) { @@ -1566,7 +1570,7 @@ nmi_cmdline_reader_parse(const char *etc_connections_dir, nvmf_nonbft = TRUE; } - if (!nvmf_nonbft) { + if (!nvmf_nonbft && !have_dracut_nbft) { NMConnection **nbft_connections, **c; nbft_connections = nmi_nbft_reader_parse(sysfs_dir, &reader->hostname);