From 05e4a733f2141995181a551854d5df929f084adf Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 9 Aug 2023 21:55:35 +0200 Subject: New upstream version 1.44.0 --- src/core/main.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/core/main.c') 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) { -- cgit 1.3.0-6-gf8a5