summary refs log tree commit diff
path: root/src/nm-initrd-generator/nmi-cmdline-reader.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-10-18 11:56:48 +0200
committerMichael Biebl <biebl@debian.org>2022-10-18 11:56:48 +0200
commit9f101839d9e64df832e9e43c5181887369c46a7e (patch)
tree3e23589a9d4e9e7c32ce41b634ccf26af3f0d45e /src/nm-initrd-generator/nmi-cmdline-reader.c
parentab0efddcdb48d800e2f938da54cfe3074640792e (diff)
New upstream version 1.40.2 upstream/1.40.2
Diffstat (limited to 'src/nm-initrd-generator/nmi-cmdline-reader.c')
-rw-r--r--src/nm-initrd-generator/nmi-cmdline-reader.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nm-initrd-generator/nmi-cmdline-reader.c b/src/nm-initrd-generator/nmi-cmdline-reader.c
index 34b19e45..36bfdb0b 100644
--- a/src/nm-initrd-generator/nmi-cmdline-reader.c
+++ b/src/nm-initrd-generator/nmi-cmdline-reader.c
@@ -99,6 +99,7 @@ reader_create_connection(Reader                  *reader,
                          const char              *ifname,
                          const char              *mac,
                          const char              *type_name,
+                         int                      autoconnect_priority,
                          NMConnectionMultiConnect multi_connect)
 {
     NMConnection *connection;
@@ -155,6 +156,8 @@ reader_create_connection(Reader                  *reader,
                  multi_connect,
                  NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES,
                  1,
+                 NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY,
+                 autoconnect_priority,
                  NULL);
 
     if (nm_streq0(type_name, NM_SETTING_INFINIBAND_SETTING_NAME)) {
@@ -189,6 +192,7 @@ reader_get_default_connection(Reader *reader)
                                        NULL,
                                        NULL,
                                        NM_SETTING_WIRED_SETTING_NAME,
+                                       NMI_AUTOCONNECT_PRIORITY_CMDLINE,
                                        NM_CONNECTION_MULTI_CONNECT_MULTIPLE);
         nm_connection_add_setting(con, nm_setting_wired_new());
         reader->default_connection = con;
@@ -264,6 +268,7 @@ reader_get_connection(Reader     *reader,
                                               ifname,
                                               mac,
                                               type_name,
+                                              NMI_AUTOCONNECT_PRIORITY_CMDLINE,
                                               NM_CONNECTION_MULTI_CONNECT_SINGLE);
     }
     setting = (NMSetting *) nm_connection_get_setting_connection(connection);
@@ -1526,6 +1531,7 @@ nmi_cmdline_reader_parse(const char        *etc_connections_dir,
                                                   NULL,
                                                   bootif,
                                                   NM_SETTING_WIRED_SETTING_NAME,
+                                                  NMI_AUTOCONNECT_PRIORITY_FIRMWARE,
                                                   NM_CONNECTION_MULTI_CONNECT_SINGLE);
         } else {
             g_object_set(s_wired, NM_SETTING_WIRED_MAC_ADDRESS, bootif, NULL);