mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-20 20:00:40 +02:00
ifcfg-rh: write SLAVE=yes on bond slave connections
For compatibility with the old network scripts.
This commit is contained in:
parent
3bb54e2084
commit
7b85fb6f78
2 changed files with 7 additions and 2 deletions
|
|
@ -1755,6 +1755,10 @@ check_if_bond_slave (shvarFile *ifcfg,
|
|||
NULL);
|
||||
g_free (value);
|
||||
}
|
||||
|
||||
/* We should be checking for SLAVE=yes as well, but NM used to not set that,
|
||||
* so for backward-compatibility, we don't check.
|
||||
*/
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -1698,9 +1698,10 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg)
|
|||
|
||||
master = nm_setting_connection_get_master (s_con);
|
||||
if (master) {
|
||||
if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_BOND_SETTING_NAME))
|
||||
if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_BOND_SETTING_NAME)) {
|
||||
svSetValue (ifcfg, "MASTER", master, FALSE);
|
||||
else if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_BRIDGE_SETTING_NAME))
|
||||
svSetValue (ifcfg, "SLAVE", "yes", FALSE);
|
||||
} else if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_BRIDGE_SETTING_NAME))
|
||||
svSetValue (ifcfg, "BRIDGE", master, FALSE);
|
||||
else if (nm_setting_connection_is_slave_type (s_con, NM_SETTING_TEAM_SETTING_NAME)) {
|
||||
svSetValue (ifcfg, "TEAM_MASTER", master, FALSE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue