diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-30 15:42:44 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-06-01 19:06:34 +0200 |
commit | 1d0e0eeffd92f53d6682cd8f4b3e1ba90997e4c5 (patch) | |
tree | f0689ea8feef067115bb293a5f42a04a4c70c6b9 /introspection | |
parent | 89135853972710ce0f720acba4b3c12910e3cebc (diff) | |
download | NetworkManager-1d0e0eeffd92f53d6682cd8f4b3e1ba90997e4c5.tar.gz |
manager: add Reload() D-Bus command
Add new Reload D-Bus command to reload NetworkManager configuration.
For now, this is like sending SIGHUP to the process. There are several
advantages here:
- it is guarded via PolicyKit authentication while signals
can only be sent by root.
- the user can wait for the reload to be complete instead of sending
an asynchronous signal. For now, we operation completes after
nm_config_reload() returns, but later we could delay the response
further until specific parts are fully reloaded.
- SIGHUP reloads everything including re-reading configuration from
disk while SIGUSR1 reloads just certain parts such as writing out DNS
configuration anew.
Now, the Reload command has a flags argument which is more granular
in selecting parts which are to be reloaded. For example, via
signals the user can:
1) send SIGUSR1: this writes out the DNS configuration to
resolv.conf and possibly reloads other parts without
re-reading configuration and without restarting the DNS plugin.
2) send SIGHUP: this reloads configuration from disk,
writes out resolv.conf and restarts the DNS plugin.
There is no way, to only restart the DNS plugin without also reloading
everything else.
Diffstat (limited to 'introspection')
-rw-r--r-- | introspection/nm-manager.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml index e5cb23a563..ba898a78c8 100644 --- a/introspection/nm-manager.xml +++ b/introspection/nm-manager.xml @@ -4,6 +4,15 @@ <annotation name="org.gtk.GDBus.C.Name" value="Manager"/> <!-- + Reload: + @flags: optional flags to specify which parts shall be reloaded. A default of zero + means to reload everything. + --> + <method name="Reload"> + <arg name="flags" type="u" direction="in"/> + </method> + + <!-- GetDevices: @devices: List of object paths of network devices known to the system. This list does not include device placeholders (see GetAllDevices()). |