summaryrefslogtreecommitdiff
path: root/src/initrd/nmi-cmdline-reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/initrd/nmi-cmdline-reader.c')
-rw-r--r--src/initrd/nmi-cmdline-reader.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/initrd/nmi-cmdline-reader.c b/src/initrd/nmi-cmdline-reader.c
index b00ca5962d..8e07f66341 100644
--- a/src/initrd/nmi-cmdline-reader.c
+++ b/src/initrd/nmi-cmdline-reader.c
@@ -630,6 +630,13 @@ parse_bootdev (GHashTable *connections, char *argument)
connection = get_conn (connections, NULL, NULL);
+ if ( nm_connection_get_interface_name (connection)
+ && strcmp (nm_connection_get_interface_name (connection), argument) != 0) {
+ /* If the default connection already has an interface name,
+ * we should not overwrite it. Create a new one instead. */
+ connection = get_conn (connections, argument, NULL);
+ }
+
s_con = nm_connection_get_setting_connection (connection);
g_object_set (s_con,
NM_SETTING_CONNECTION_INTERFACE_NAME, argument,