ifcfg-rh: write SLAVE=yes on bond slave connections

For compatibility with the old network scripts.
This commit is contained in:
Dan Winship 2014-01-28 09:25:59 -05:00
parent 3bb54e2084
commit 7b85fb6f78
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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);