diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 10:49:37 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-01-25 10:49:37 +0100 |
| commit | 404ebe62622150e77e311777dff8617eb974e834 (patch) | |
| tree | cc7f73d3e435d5b3ee85e2bef833e8de1fb133e3 /src/main.c | |
| parent | 227c401a10a930af6fd5f123aef345fcd130d6aa (diff) | |
| parent | 3626b425d1bc017fdc6f1ea0cfd329d1e1681641 (diff) | |
Merge remote-tracking branch 'salsa/upstream' into upstream
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index 7da0c3c2..f834fa94 100644 --- a/src/main.c +++ b/src/main.c @@ -59,7 +59,6 @@ #endif #define NM_DEFAULT_PID_FILE NMRUNDIR "/NetworkManager.pid" -#define NM_DEFAULT_SYSTEM_STATE_FILE NMSTATEDIR "/NetworkManager.state" #define CONFIG_ATOMIC_SECTION_PREFIXES ((char **) NULL) @@ -398,8 +397,13 @@ main (int argc, char *argv[]) NM_CONFIG_KEYFILE_KEY_MAIN_AUTH_POLKIT, NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_BOOL)); - if (!nm_dbus_manager_acquire_bus (nm_dbus_manager_get ())) - goto done_no_manager; + if (!nm_config_get_configure_and_quit (config)) { + /* D-Bus is useless in configure and quit mode -- we're eventually dropping + * off and potential clients would have no way of knowing whether we're + * finished already or didn't start yet. */ + if (!nm_dbus_manager_acquire_bus (nm_dbus_manager_get ())) + goto done_no_manager; + } manager = nm_manager_setup (); nm_dbus_manager_start (nm_dbus_manager_get(), @@ -444,7 +448,7 @@ done: * state here. We don't bother updating the state as devices * change during regular operation. If NM is killed with SIGKILL, * it misses to update the state. */ - nm_manager_write_device_state (manager); + nm_manager_write_device_state_all (manager); nm_manager_stop (manager); |