initrd: skip NBFT parsing when already defined on the cmdline
Skip the internal NBFT table parsing when nbft interfaces are already defined on the cmdline, e.g. from the original 95nvmf dracut module. Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
This commit is contained in:

committed by
Beniamino Galvani

parent
81839c0da8
commit
f0d6b339bf
@@ -1454,6 +1454,7 @@ nmi_cmdline_reader_parse(const char *etc_connections_dir,
|
|||||||
guint64 dhcp_timeout = 90;
|
guint64 dhcp_timeout = 90;
|
||||||
guint64 dhcp_num_tries = 1;
|
guint64 dhcp_num_tries = 1;
|
||||||
gboolean nvmf_nonbft = FALSE;
|
gboolean nvmf_nonbft = FALSE;
|
||||||
|
gboolean have_dracut_nbft = FALSE;
|
||||||
|
|
||||||
reader = reader_new();
|
reader = reader_new();
|
||||||
|
|
||||||
@@ -1470,7 +1471,10 @@ nmi_cmdline_reader_parse(const char *etc_connections_dir,
|
|||||||
/* pass */
|
/* pass */
|
||||||
} else if (nm_streq(tag, "net.ifnames"))
|
} else if (nm_streq(tag, "net.ifnames"))
|
||||||
net_ifnames = !nm_streq(argument, "0");
|
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);
|
reader->ignore_auto_dns = !_nm_utils_ascii_str_to_bool(argument, TRUE);
|
||||||
else if (nm_streq(tag, "rd.net.timeout.dhcp")) {
|
else if (nm_streq(tag, "rd.net.timeout.dhcp")) {
|
||||||
if (nm_streq0(argument, "infinity")) {
|
if (nm_streq0(argument, "infinity")) {
|
||||||
@@ -1566,7 +1570,7 @@ nmi_cmdline_reader_parse(const char *etc_connections_dir,
|
|||||||
nvmf_nonbft = TRUE;
|
nvmf_nonbft = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nvmf_nonbft) {
|
if (!nvmf_nonbft && !have_dracut_nbft) {
|
||||||
NMConnection **nbft_connections, **c;
|
NMConnection **nbft_connections, **c;
|
||||||
|
|
||||||
nbft_connections = nmi_nbft_reader_parse(sysfs_dir, &reader->hostname);
|
nbft_connections = nmi_nbft_reader_parse(sysfs_dir, &reader->hostname);
|
||||||
|
Reference in New Issue
Block a user