diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/modules/module-console-kit.c | 13 | ||||
-rw-r--r-- | src/modules/module-systemd-login.c | 5 |
4 files changed, 8 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index 8a02cb7d..43d3b44d 100644 --- a/configure.ac +++ b/configure.ac @@ -1163,7 +1163,7 @@ AC_ARG_ENABLE([systemd], AS_HELP_STRING([--disable-systemd],[Disable optional systemd support])) AS_IF([test "x$enable_systemd" != "xno"], - [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login libsystemd-daemon ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)], + [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)], HAVE_SYSTEMD=0) AS_IF([test "x$enable_systemd" = "xyes" && test "x$HAVE_SYSTEMD" = "x0"], diff --git a/src/Makefile.am b/src/Makefile.am index 559c43ee..4b3efa37 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1971,8 +1971,8 @@ module_udev_detect_la_CFLAGS = $(AM_CFLAGS) $(UDEV_CFLAGS) module_console_kit_la_SOURCES = modules/module-console-kit.c module_console_kit_la_LDFLAGS = $(MODULE_LDFLAGS) -module_console_kit_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) $(SYSTEMD_LIBS) -module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) $(SYSTEMD_CFLAGS) +module_console_kit_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) +module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) module_systemd_login_la_SOURCES = modules/module-systemd-login.c module_systemd_login_la_LDFLAGS = $(MODULE_LDFLAGS) diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c index c9c2f453..af1e02b0 100644 --- a/src/modules/module-console-kit.c +++ b/src/modules/module-console-kit.c @@ -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"); diff --git a/src/modules/module-systemd-login.c b/src/modules/module-systemd-login.c index 8ad836e4..cc8b4625 100644 --- a/src/modules/module-systemd-login.c +++ b/src/modules/module-systemd-login.c @@ -31,7 +31,6 @@ #include <sys/types.h> #include <systemd/sd-login.h> -#include <systemd/sd-daemon.h> #include <pulse/xmalloc.h> @@ -169,8 +168,8 @@ int pa__init(pa_module *m) { pa_assert(m); - /* If we are not actually booting with systemd become a NOP */ - if (sd_booted() <= 0) + /* If we are not actually running logind become a NOP */ + if (access("/run/systemd/seats/", F_OK) < 0) return 0; ma = pa_modargs_new(m->argument, valid_modargs); |