mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
console-kit, systemd-login: Check for logind, not for systemd
It is possible to build systemd without logind, in which case sd_booted() wo succeed. Check for /run/systemd/seats to test for logind instead, as recommended by systemd upstream. For details, see: <https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html Drop the now unnecessary linking against libsystemd-daemon, and stop linking the consolekit module to any systemd library. https://bugs.freedesktop.org/show_bug.cgi?id=62593
This commit is contained in:
parent
578d2ce5c8
commit
ef199c8a81
4 changed files with 8 additions and 16 deletions
|
|
@ -30,11 +30,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
#include <systemd/sd-login.h>
|
||||
#include <systemd/sd-daemon.h>
|
||||
#endif
|
||||
|
||||
#include <pulse/xmalloc.h>
|
||||
|
||||
#include <pulsecore/module.h>
|
||||
|
|
@ -285,12 +280,10 @@ int pa__init(pa_module*m) {
|
|||
|
||||
dbus_error_init(&error);
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
/* If systemd support is enabled and we boot on systemd we
|
||||
shouldn't watch ConsoleKit but systemd's logind service. */
|
||||
if (sd_booted() > 0)
|
||||
/* If systemd's logind service is running, we shouldn't watch ConsoleKit
|
||||
* but login */
|
||||
if (access("/run/systemd/seats/", F_OK) >= 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
|
||||
pa_log("Failed to parse module arguments");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue