mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 17:50:14 +01:00
ifcfg-rh writer: do not set TYPE for team ports (rh #1074160)
Notes and changes by jklimes: - fix reading TeamPort without TYPE=Ethernet - fix tests Ideally this should be solved on initscripts side. But teamd doesn't want to do any changes to initscripts, so we make a workaround here. https://bugzilla.redhat.com/show_bug.cgi?id=1074160
This commit is contained in:
parent
4112bda940
commit
8bed556019
3 changed files with 5 additions and 0 deletions
|
|
@ -4999,6 +4999,8 @@ connection_from_file (const char *filename,
|
|||
if (devtype) {
|
||||
if (!strcasecmp (devtype, TYPE_TEAM))
|
||||
type = g_strdup (TYPE_TEAM);
|
||||
else if (!strcasecmp (devtype, TYPE_TEAM_PORT))
|
||||
type = g_strdup (TYPE_ETHERNET);
|
||||
g_free (devtype);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13517,6 +13517,8 @@ test_write_team_port (void)
|
|||
g_assert (success);
|
||||
|
||||
/* re-read the file to check that what key was written. */
|
||||
val = svGetValue (f, "TYPE", FALSE);
|
||||
g_assert (!val);
|
||||
val = svGetValue (f, "DEVICETYPE", FALSE);
|
||||
g_assert (val);
|
||||
g_assert_cmpstr (val, ==, "TeamPort");
|
||||
|
|
|
|||
|
|
@ -1742,6 +1742,7 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
|
|||
else if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_TEAM_SETTING_NAME)) {
|
||||
svSetValue (ifcfg, "TEAM_MASTER", master, FALSE);
|
||||
svSetValue (ifcfg, "DEVICETYPE", TYPE_TEAM_PORT, FALSE);
|
||||
svSetValue (ifcfg, "TYPE", NULL, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue