diff options
| author | Michael Biebl <biebl@debian.org> | 2023-08-09 21:55:35 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-08-09 21:55:35 +0200 |
| commit | 05e4a733f2141995181a551854d5df929f084adf (patch) | |
| tree | 83bb937740a6667525ba0df046748ecaa829c269 /src/core/main.c | |
| parent | 14b0f3a9dc9ea90d60a3b057350fd4d637dc021a (diff) | |
New upstream version 1.44.0 upstream/1.44.0
Diffstat (limited to 'src/core/main.c')
| -rw-r--r-- | src/core/main.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/main.c b/src/core/main.c index 2eb230d9..4c7de6cd 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -266,13 +266,14 @@ _dbus_manager_init(NMConfig *config) c_a_q_type = nm_config_get_configure_and_quit(config); - if (c_a_q_type == NM_CONFIG_CONFIGURE_AND_QUIT_DISABLED) - return nm_dbus_manager_acquire_bus(busmgr, TRUE); + if (c_a_q_type == NM_CONFIG_CONFIGURE_AND_QUIT_INITRD) { + /* in initrd we don't have D-Bus at all. Don't even try to get the G_BUS_TYPE_SYSTEM + * connection. And of course don't claim the D-Bus name. */ + return TRUE; + } - nm_assert(c_a_q_type == NM_CONFIG_CONFIGURE_AND_QUIT_INITRD); - /* in initrd we don't have D-Bus at all. Don't even try to get the G_BUS_TYPE_SYSTEM - * connection. And of course don't claim the D-Bus name. */ - return TRUE; + nm_assert(c_a_q_type == NM_CONFIG_CONFIGURE_AND_QUIT_DISABLED); + return nm_dbus_manager_setup(busmgr); } /* @@ -507,6 +508,9 @@ main(int argc, char *argv[]) nm_log_dbg(LOGD_CORE, "setting up local loopback"); nm_platform_link_change_flags(NM_PLATFORM_GET, 1, IFF_UP, TRUE); + if (!nm_dbus_manager_request_name_sync(nm_dbus_manager_get())) + goto done; + success = TRUE; if (configure_and_quit == FALSE) { |