config: write connectivity=true to internal state file

The internal state file is supposed to overwrite the files from /etc.
Hence, we must also explicitly enable connectivity checking, when the
user wishes to do so. Otherwise, if /etc contains connectivity=false,
the setting cannot be overruled via D-Bus.
This commit is contained in:
Thomas Haller 2017-08-21 12:18:13 +02:00
parent 804b2c2365
commit 13f955db58

View file

@ -1608,10 +1608,8 @@ void nm_config_set_connectivity_check_enabled (NMConfig *self,
/* Remove existing groups */
g_key_file_remove_group (keyfile, NM_CONFIG_KEYFILE_GROUP_CONNECTIVITY, NULL);
if (!enabled) {
g_key_file_set_value (keyfile, NM_CONFIG_KEYFILE_GROUP_CONNECTIVITY,
"enabled", "false");
}
g_key_file_set_value (keyfile, NM_CONFIG_KEYFILE_GROUP_CONNECTIVITY,
"enabled", enabled ? "true" : "false");
nm_config_set_values (self, keyfile, TRUE, FALSE);
g_key_file_unref (keyfile);