config: fix setting default configuration for 'main.plugins'
authorThomas Haller <thaller@redhat.com>
Sat, 6 Jun 2015 22:02:20 +0000 (00:02 +0200)
committerThomas Haller <thaller@redhat.com>
Thu, 2 Jul 2015 14:01:20 +0000 (16:01 +0200)
commit98dd29e4ae79e08e2f6b0e607f3cdb8af564daa1
treec26dde0e9b8f3cff8ba79685365dd2bdccd560b6
parentffa70203fdd6434712ccf7ad42ea76a6abc46a87
config: fix setting default configuration for 'main.plugins'

'main.plugins' is the only configuration options for which we
have a default value and which we always want to set.

This property has a compile time default and can be set via command line,
fix the logic to set the value.

The proper way is:

  - first set it (always) to the compile time default
  - then read the configuration files, which potentially modify
    the value.
  - finally, if set via command line, overwrite it because
    command line always wins.

Also comment-out the setting from our default file in
"contrib/fedora/rpm/NetworkManager.conf". We don't really need it to be
configured there, as we have a compile time default. Commenting it out
makes this clearer to the user.

Note that we cannot drop "10-ibft-plugin.conf" snippet from
NetworkManager package, because many users might have an old
"NetworkManager.conf" file with "plugin=ifcfg-rh".

This is a change in behavior if the user has no explicit
"plugins=ifcfg-rh" setting but followed by "plugins+=ibft".
contrib/fedora/rpm/NetworkManager.conf
src/nm-config.c