[gnome-session] gsm_systemd_new: Check for logind, not for systemd
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gsm_systemd_new: Check for logind, not for systemd
- Date: Fri, 29 Mar 2013 09:57:54 +0000 (UTC)
commit f11fde2c8ddc7ce361a62fc47aea68b114c0df17
Author: Martin Pitt <martinpitt gnome org>
Date: Thu Mar 21 11:06:03 2013 +0100
gsm_systemd_new: Check for logind, not for systemd
It is possible to build systemd without logind or run logind without systemd
init, in both cases testing for systemd init with sd_booted() is wrong. Check
for /run/systemd/seats 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.
https://bugzilla.gnome.org/show_bug.cgi?id=696262
configure.ac | 2 +-
gnome-session/gsm-systemd.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c3870f8..92b459d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,7 +115,7 @@ AC_ARG_ENABLE([systemd],
[enable_systemd=auto])
PKG_CHECK_MODULES(SYSTEMD,
- [gio-unix-2.0 libsystemd-login >= 183 libsystemd-daemon libsystemd-journal],
+ [gio-unix-2.0 libsystemd-login >= 183 libsystemd-journal],
[have_systemd=yes], [have_systemd=no])
AC_MSG_CHECKING([whether to use systemd])
diff --git a/gnome-session/gsm-systemd.c b/gnome-session/gsm-systemd.c
index 68d8988..ae29800 100644
--- a/gnome-session/gsm-systemd.c
+++ b/gnome-session/gsm-systemd.c
@@ -33,7 +33,6 @@
#include <pwd.h>
#include <systemd/sd-login.h>
-#include <systemd/sd-daemon.h>
#include <glib.h>
#include <glib-object.h>
@@ -879,7 +878,8 @@ gsm_systemd_new (void)
{
GsmSystemd *manager;
- if (sd_booted () <= 0)
+ /* logind is not running ? */
+ if (access("/run/systemd/seats/", F_OK) < 0)
return NULL;
manager = g_object_new (GSM_TYPE_SYSTEMD, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]