mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 14:40:21 +01:00
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:
parent
81839c0da8
commit
f0d6b339bf
1 changed files with 9 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue