mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 18:10:21 +01:00
ifcfg: don't use D-Bus connection if NMDBusManager is without main connection
In configure-and-quit mode, NMDBusManager does not have a D-Bus connection. Likewise, ifcfg-rh plugin should not use one either.
This commit is contained in:
parent
9d602529cc
commit
1e742e0fb4
1 changed files with 6 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include "nm-utils.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "nm-config.h"
|
||||
#include "nm-dbus-manager.h"
|
||||
#include "settings/nm-settings-plugin.h"
|
||||
#include "settings/nm-settings-utils.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
|
|
@ -1132,6 +1133,11 @@ _dbus_setup (NMSIfcfgRHPlugin *self)
|
|||
|
||||
_dbus_clear (self);
|
||||
|
||||
if (!NM_MAIN_DBUS_CONNECTION_GET) {
|
||||
_LOGW ("dbus: don't use D-Bus for %s service", IFCFGRH1_BUS_NAME);
|
||||
return;
|
||||
}
|
||||
|
||||
/* We use a separate D-Bus connection so that org.freedesktop.NetworkManager and com.redhat.ifcfgrh1
|
||||
* are exported by different connections. */
|
||||
address = g_dbus_address_get_for_bus_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue