GNOME Bugzilla – Bug 779167
Please add elogind support
Last modified: 2017-02-24 15:43:05 UTC
Created attachment 346619 [details] [review] Patch in elogind support Hello everybody, to be able to use NetworkManager on a system, where no systemd is installed, there is currently the possibility to use ConsoleKit2 instead. As systemd-login has some advantages over ConsoleKit2, the elogind project (https://github.com/elogind/elogind) tries to offer a stand-alone systemd-login variant for those, who wish to use a different init system than systemd. Please find attached a patch that enables networkmanager to use elogind for session tracking. I am currently using networkmanager-1.4.4, with dhcpcd-6.11.5 and elogind-226 (dev_226 branch) on a Gentoo system run by openrc-0.23.2. Everything works just fine. This goes back on Gentoo Bug 607352 (https://bugs.gentoo.org/show_bug.cgi?id=607352) where the wish for elogind support in NetworkManager was issued initially. Cheers Sven
Hi, looks good. How about the additional commit: https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/elogind-bgo779167
(In reply to Thomas Haller from comment #1) > Hi, > > looks good. > > How about the additional commit: > https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/elogind- > bgo779167 Well, I do like the way the _LOG* messages were unified. That's really nicely done. The "concurrency" checking looks solid, but technically speaking, systemd and elogind make no sense on the same machine. elogind does not, like systemd-logind does, register with systemd, so it makes more sense to use systemd-logind. However, users *might* come up with the idea to use systemd and substitute systemd-logind with elogind. Even if it is only "because you can". ;-) Thank you very much!
one can compile NM with consolekit and *logind support, and at runtime is taken whatever is available. With the current code, it is not possible to use both systemd and elogind. It could anyway be complicated to implement, because both libraries expose the same symbols. Using symbol versioning it may work, but the patch doesn't support that, so it should be prevented from compiling. Merged: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e40d47fe7ccd725ecf6231e0f1193a029ea05e47
and thanks!