Blob Blame History Raw
--- a/configure.ac
+++ b/configure.ac
@@ -606,7 +606,7 @@ AC_ARG_WITH(systemd,
             [with_systemd=$withval], [with_systemd=auto])
 
 PKG_CHECK_MODULES(SYSTEMD,
-                  [libsystemd-login libsystemd-daemon],
+                  [libsystemd-login],
                   [have_systemd=yes], [have_systemd=no])
 
 if test "x$with_systemd" = "xauto" ; then
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <glib/gi18n.h>
 
@@ -33,7 +34,6 @@
 #include <dbus/dbus-glib-lowlevel.h>
 
 #ifdef WITH_SYSTEMD
-#include <systemd/sd-daemon.h>
 #include <systemd/sd-login.h>
 #endif
 
@@ -1518,7 +1518,8 @@ gs_listener_init (GSListener *listener)
         listener->priv = GS_LISTENER_GET_PRIVATE (listener);
 
 #ifdef WITH_SYSTEMD
-        listener->priv->have_systemd = sd_booted () > 0;
+        /* check if logind is running */
+        listener->priv->have_systemd = (access("/run/systemd/seats/", F_OK) >= 0);
 #endif
 
         gs_listener_dbus_init (listener);