-
Thomas Haller authored
Note that various components (NMFirewallManager, NMAuthManager, NMConnectivity, etc.pp) all request their own GDBusConnection from glib's G_BUS_TYPE_SYSTEM singleton. In the future, let them instead use the D-Bus connection that NMDBusManager already has. - NMDBusManager also uses g_bus_get(G_BUS_TYPE_SYSTEM), so in practice this is just the same GDBusConnection instance. - if it would not be the same GDBusConnection instance, it would be more correct/logical to use the one that NMDBusManager uses. - NMDBusManager already aquired the GDBusConnection synchronously and it's ready for use. On the other hand, g_bus_get()/g_bus_get_sync() has the notion that getting the singleton cannot be done without waiting/blocking. So at least it involves locking or even dispatching the async reply on D-Bus. - in "configure-and-quit=initrd" we really don't have D-Bus available. NMDBusManager should control whether the other components use D-Bus or not. For example, NMFirewallManager should not ask glib for a G_BUS_TYPE_SYSTEM singleton only to later find out that it doesn't work. So if these components would reuse NMDBusManager's GDBusConnection, then it must have the connection also in regular "configure-and-quit=true" mode. In this case, we are in late boot and want do connectivity checking and talk to firewalld.
49ed2079