diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c index 19c4f51eb4..c1396f7381 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-plugin.c @@ -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);