diff options
author | Thomas Haller <thaller@redhat.com> | 2017-08-21 12:18:13 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-08-21 12:18:13 +0200 |
commit | 13f955db58bd60a7f5a8e5600c7de62ee9a4c876 (patch) | |
tree | 0f6c89783a352a968f93501ea54f1c3ea5f7e125 | |
parent | 804b2c23650a9dc25d7d8030f7cb6962afdbd43c (diff) |
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.
-rw-r--r-- | src/nm-config.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nm-config.c b/src/nm-config.c index 3faea15772..de727c9882 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -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); |